Rootop 服务器运维与web架构

Warning: Unknown: open_basedir restriction in effect.

| 暂无评论

php环境完成后测试页报错:

Warning: Unknown: open_basedir restriction in effect. File(/data/web/tp/phpinfo.php) is not within the allowed path(s): (/tmp) in Unknown on line 0

Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Fatal error: Unknown: Failed opening required ‘/data/web/tp/phpinfo.php’ (include_path=’.:/var/www/php5/lib/php’) in Unknown on line 0

解决方法,修改php.ini ,open_basedir参数改为你的网站根目录 (或者直接注释掉此行)

open_basedir = /data/web/tp

这个参数限定了php允许执行的目录,如果超出此目录就会报错。

重启apache。

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/1637.html

作者:Venus

服务器运维与性能优化

发表回复