关于open_basedir

回复 收藏
本帖最后由 sweetzwl 于 2016-6-17 00:32 编辑

我在apache虚拟主机上配置了open_basedir后

PHP错误日志不停的报错, 不访问也报 怎么回事啊
APACHE配置:


    DocumentRoot "/www"
    ServerName www.laa.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error_log"
    CustomLog "logs/dummy-host.example.com-access_log" common
    php_admin_value open_basedir "/www/:/tmp/"
>




PHP报错日志:

[17-Jun-2016 00:24:48 Asia/Chongqing] PHP Warning:  include(): open_basedir restriction in effect. File() is not within the all owed path(s): (/www/:/tmp/) in /www/source/class/class_core.php on line 113
[17-Jun-2016 00:25:15 Asia/Chongqing] PHP Warning:  Unknown: open_basedir restriction in effect. File() is not within the all owed path(s): (/www/:/tmp/) in Unknown on line 0
[17-Jun-2016 00:25:15 Asia/Chongqing] PHP Warning:  include(): open_basedir restriction in effect. File() is not within the all owed path(s): (/www/:/tmp/) in /www/source/class/class_core.php on line 113
[17-Jun-2016 00:25:15 Asia/Chongqing] PHP Warning:  include(): open_basedir restriction in effect. File() is not within the all owed path(s): (/www/:/tmp/) in /www/source/class/class_core.php on line 113


2016-06-17 00:29 举报
已邀请:
0

820009174

赞同来自:

你的根目录是不是 /data/www ?
0

阿铭 管理员

赞同来自:

你看下那文件的113行,是不是Include 了一个其他目录的文件
0

sweetzwl

赞同来自:

820009174 发表于 2016-6-17 08:49
你的根目录是不是 /data/www ?

不是  , 根目录就是 /www
0

sweetzwl

赞同来自:

阿铭 发表于 2016-6-17 08:51
你看下那文件的113行,是不是Include 了一个其他目录的文件

http://www.apelearn.com/bbs/fo ... xnone

铭哥 , 那个文件113行是这个 不太看得懂阿,
0

阿铭 管理员

赞同来自:

可能是你的这个path 路径并不在网站根目录下。 可以搜一下 $path 在上面的代码里。

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: