thinkphp5出现500错误怎么办

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼原创
2019-08-23 09:11:376143浏览

thinkphp5出现500错误,如下图所示:

q.png

相关推荐:《ThinkPHP教程

require(): open_basedir restriction in effect. File(/home/wwwroot/pic/thinkphp/start.php) is not within 
the allowed

解决方法:

1、我是lnmp1.4 php5.6,php.ini里面的open_basedir 是注释掉的。

2、查找到是fastcgi问题。

3、修改fastcgi的配置文件。

/usr/local/nginx/conf/fastcgi.conffastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";

修改为

fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/../:/tmp/:/proc/";

w.jpg

4、重启 service nginx restart。

以上就是thinkphp5出现500错误怎么办的详细内容,更多请关注php中文网其它相关文章!

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。