亚洲色蝴蝶中文娱乐网,在线亚洲欧美一区二区中文字幕,无人视频在线观看视频高清视频,99午夜国产精品一区二区,人人妻人人爽人人狠狠

open_basedir restriction in effect解決方法

時間:2018-05-22 00:57:19 類型:Linux
字號:    

在linux服務器部署站點的時候PHP報了這個錯誤

Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/zhuyuyun/thinkphp/start.php) is not within the allowed path(s): (/www/wwwroot/zhuyuyun/public/:/tmp/:/proc/) in /www/wwwroot/zhuangzi/public/index.php on line 20
Warning: require(/www/wwwroot/zhuangzi/thinkphp/start.php): failed to open stream: Operation not permitted in /www/wwwroot/zhuangzi/public/index.php on line 20
Fatal error: require(): Failed opening required '/www/wwwroot/zhuyuyun/public/../thinkphp/start.php' (include_path='.:/www/server/php/56/lib/php') in /www/wwwroot/zhuangzi/public/index.php on line 20

出現(xiàn)問題的原因:

查看問題描述以及資料,發(fā)現(xiàn)是php open_basedir 配置的問題,PHP不能引入其授權目錄上級及其以上的文件;

一般情況下是不會出現(xiàn)這種問題的,之所以出現(xiàn)這個問題絕大多數(shù)情況是由于服務器的原因,為了安全才做了這樣的限制!

fpm/fastcgi user.ini 修改方法

打開 項目根目錄下找到 user.ini 文件,搜索 open_basedir,把
open_basedir=/home/wwwroot/www.zhuangzi.com/public/:/tmp/:/proc/
修改為
open_basedir=/home/wwwroot/www.zhuangzi.cn/:/tmp/:/proc/

然后重新啟動 web 服務器 即可生效