Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/www.aimeaer.com/vendor/autoload.php) is not within the allowed path(s): (/home/wwwroot/www.aimeaer.com/web/:/tmp/:/proc/) in /home/wwwroot/www.aimeaer.com/web/index.php on line 9
Warning: require(/home/wwwroot/www.aimeaer.com/vendor/autoload.php): failed to open stream: Operation not permitted in /home/wwwroot/www.aimeaer.com/web/index.php on line 9
Warning: require(/home/wwwroot/www.aimeaer.com/vendor/autoload.php): failed to open stream: Operation not permitted in /home/wwwroot/www.aimeaer.com/web/index.php on line 9
Fatal error: require(): Failed opening required '/home/wwwroot/www.aimeaer.com/web/../vendor/autoload.php' (include_path='.:/usr/local/php/lib/php') in /home/wwwroot/www.aimeaer.com/web/index.php on line 9
将/usr/local/nginx/conf/fastcgi.cong下面这段内容注释,否则require无法引入上级目录的文件
#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
本文解决了一个特定的PHP警告和致命错误问题,该问题源于open_basedir限制导致无法加载vendor/autoload.php文件。通过修改Nginx配置文件中的fastcgi参数设置,可以解除此限制并成功引入上级目录的文件。
1905

被折叠的 条评论
为什么被折叠?



