标题 第一步进行php.ini文件的更改
// 把php.ini 文件中的Off 更改为下方On
display_errors = On
display_startup_errors = On
运行一下 : php - fpm
报下面的提示信息请:删除 php-cgi.sock 在运行php - fpm
[05-Jun-2019 13:11:00] ERROR: An another FPM instance seems to already listen on /tmp/php-cgi.sock
[05-Jun-2019 13:11:00] ERROR: FPM initialization failed
如果运行报一下错误
(我的这边是TP的报错,Lravel和在下面的错误大致相同,解决办法都是一样的)
Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/tp5.test.com/tp5/thinkphp/start.php) is not within the allowed path(s): (/www/wwwroot/tp5.test.com/tp5/public/:/tmp/:/proc/) in /www/wwwroot/tp5.test.com/tp5/public/index.php on line 17
Warning: require(/www/wwwroot/tp5.test.com/tp5/thinkphp/start.php): failed to open stream: Operation not permitted in /www/wwwroot/tp5.test.com/tp5/public/index.php on line 17
我的服务器是nginx的 nginx的配置文件
找到 usr/local/nginx/fastcgi.conf
显示部分直接复制粘贴及可 注释掉原来的部分!
#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
fastcgi_param PHP_ADMIN_VALUE "open_basedir=NULL";
重启 nginx -s reload
**以上部分属于个人采坑 ,希望对你有帮助!** *属于个人原创*