lnmp一键安装包部署了laravel框架后报错:

系统运维 waitig 651℃ 百度已收录 0评论

报错信息:

Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/default/blog/bootstrap/autoload.php) is not within the allowed path(s): (/home/wwwroot/default/blog/public/:/tmp/:/proc/) in /home/wwwroot/default/blog/public/index.php on line 22

Warning: require(/home/wwwroot/default/blog/bootstrap/autoload.php): failed to open stream: Operation not permitted in /home/wwwroot/default/blog/public/index.php on line 22

Fatal error: require(): Failed opening required ‘/home/wwwroot/default/blog/public/../bootstrap/autoload.php’ (include_path=’.:/usr/local/php/lib/php’) in /home/wwwroot/default/blog/public/index.php on line 22

此地址有相关的解决方案:
解决方案:https://www.iamle.com/archives/1854.html

#在php-fpm.conf对应的pool池中行尾配置
php_admin_value[open_basedir]=/home/wwwroot/:/proc/:/tmp/

#在nginx fastcgi fastcgi_param配置
#这里用$document_root是一种取巧的方法,也可以设置绝对路径
# set php open_basedir
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";

#在php.ini行尾配置
[HOST=www.iamle.com]
open_basedir=/home/wwwroot/www.iamle.com/:/proc/:/tmp/
[PATH=/home/wwwroot/www.iamle.com/]
open_basedir=/home/wwwroot/www.iamle.com/:/proc/:/tmp/


本文由【waitig】发表在等英博客
本文固定链接:lnmp一键安装包部署了laravel框架后报错:
欢迎关注本站官方公众号,每日都有干货分享!
等英博客官方公众号
点赞 (0)分享 (0)