vagrant lnmp一键安装套件 laravel 安装完成启动时报错:
Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/lblog/blog/bootstrap/autoload.php) is not within the allowed path(s): (/home/wwwroot/lblog/blog/public/:/tmp/:/proc/) in /home/wwwroot/lblog/blog/public/index.php on line 22
1
修改
/usr/local/nginx/conf/fastcgi.conf
1
把
fastcgi_param PHP_ADMIN_VALUE “open_basedir=$document_root/:/tmp/:/proc/”;
1
这一行修改为(没有布署其他站点)
fastcgi_param PHP_ADMIN_VALUE “open_basedir=NULL”;
1
如果以上步骤还未解决,找下.user.ini
chattr -i public/.user.ini
1
删除它(断开 vagrant 同步)
rm -f public/.user.ini
1
ps:天下程序一大抄,不要胡乱抄,根据自己情况选择处理方式