thinkPHP5配置nginx环境无法打开(require():open_basedirrestrictionineffect.File(/mnt/hgfs/ro
(2018-07-19 22:05:27)分类: linux |
php报错
PHP Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/xxx.com/vendor/autoload.php) is not within the allowed path(s): (/home/wwwroot/xxx.com/public/:/tmp/:/proc/) in /home/wwwroot/xxx.com/public/index.php on line 24
Jul 19 21:55:04 localhost : PHP Warning: require(/home/wwwroot/xxx.com/vendor/autoload.php): failed to open stream: Operation not permitted in /home/wwwroot/xxx.com/public/index.php on line 24
Jul 19 21:55:04 localhost : PHP Fatal error: require(): Failed opening required '/home/wwwroot/xxx.com/public/../vendor/autoload.php' (include_path='.:/usr/local/php/lib/php') in /home/wwwroot/xxx.com/public/index.php on line 24
1,我是php7 ,php.ini里面的open_basedir 是注释掉的
2,后来查找到时fastcgi的问题
3,修改fastcgi的配置文件 /usr/local/nginx/conf/fastcgi.conf
重启nginx 搞定