Home  >  Article  >  PHP Framework  >  What to do if a 500 error occurs in thinkphp5

What to do if a 500 error occurs in thinkphp5

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-23 09:11:377065browse

What to do if a 500 error occurs in thinkphp5

thinkphp5 has a 500 error, as shown below:

What to do if a 500 error occurs in thinkphp5

##Related recommendations: "

ThinkPHP Tutorial"

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

Solution:

1. I am lnmp1.4 php5.6, open_basedir in php.ini is commented out.

2. It was found that it was a fastcgi problem.

3. Modify the fastcgi configuration file.

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

is changed to

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

What to do if a 500 error occurs in thinkphp5

4. Restart service nginx restart.

The above is the detailed content of What to do if a 500 error occurs in thinkphp5. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn