FastCGI sent in stderr: "PHP me

2017-12-15  本文已影响0人  chinariver

今天在lnmp 安装Yii2高级版本的时候,遇到了:

2017/12/15 23:45:10 [error] 22219#0: *9 FastCGI sent in stderr: "PHP message: PHP Warning: require(): open_basedir restriction in effect. File(/data/restfulapi/vendor/autoload.php) is not within the allowed path(s): (/data/restfulapi/api/web/:/tmp/:/proc/) in /data/restfulapi/api/web/index.php on line 5

以上错误

终于找到解决办法:

https://lnmp.org/faq/lnmp-vhost-add-howto.html#user.ini

1.删除根目录下的.user.ini

chattr -i  .user.ini

2.LNMP 1.4上如果不想用防跨目录或者修改.user.ini的防跨目录的目录还需要将 /usr/local/nginx/conf/fastcgi.conf 里面的fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"; 在该行行前添加 # 或删除改行,需要重启nginx。

上一篇下一篇

猜你喜欢

热点阅读