美文网首页
FastCGI sent in stderr: "PHP me

FastCGI sent in stderr: "PHP me

作者: chinariver | 来源:发表于2017-12-15 23:51 被阅读0次

    今天在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。

    相关文章

      网友评论

          本文标题: FastCGI sent in stderr: "PHP me

          本文链接:https://www.haomeiwen.com/subject/lmujwxtx.html