一场.user.ini引发的血案

来源:互联网 发布:linux dns配置 redhat 编辑:程序博客网 时间:2024/06/16 11:33

centos nginx php-fpm环境下
copy一个工程到本机
所有php文件都报错:

FastCGI sent in stderr: “Unable to open primary script: /var/www/xxx.php (Operation not permitted)” while reading response header from upstream, client: 117.40.138.188, server: localhost, request: “GET /xxx.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “xxx.xx.xxx.xxx”

各种搜,各种修改权限,各种修改php.ini的open_basedir,都没效果

最后才发现,有个隐藏文件.user.ini,里面包含了内容:

open_basedir=/var/www/xxxx:/tmp/:/proc/

原来文件夹内的user.ini配置了open_basedir,导致错误,将open_basedir修改为当前正确的值后,问题解决。

0 0