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修改为当前正确的值后,问题解决。
 
                   
                   
                   
                   
                             本文介绍了一种在CentOS+Nginx+PHP-FPM环境下遇到的问题:所有PHP文件因open_basedir设置不当而报错。通过排查隐藏的.user.ini文件并调整open_basedir配置解决了该问题。
本文介绍了一种在CentOS+Nginx+PHP-FPM环境下遇到的问题:所有PHP文件因open_basedir设置不当而报错。通过排查隐藏的.user.ini文件并调整open_basedir配置解决了该问题。
           
       
           
                 
                 
                 
                 
                 
                
               
                 
                 
                 
                 
                
               
                 
                 扫一扫
扫一扫
                     
              
             
                   3468
					3468
					
 被折叠的  条评论
		 为什么被折叠?
被折叠的  条评论
		 为什么被折叠?
		 
		  到【灌水乐园】发言
到【灌水乐园】发言                                
		 
		 
    
   
    
   
             
            


 
            