Home  >  Article  >  Backend Development  >  Solution to the problem that nginx+php-fpm page displays blank

Solution to the problem that nginx+php-fpm page displays blank

WBOY
WBOYOriginal
2016-07-25 09:03:421605browse
In the environment of nginx and php, I configured a wordpress. When I accessed it, I found that the php page always displayed blank. At first, I thought it was a permission problem. After changing the permission to 755, it still didn't work.

Then, I turned on the logs of nginx and php, but no valuable errors were found in the logs. Continue to try to change the php log, still to no avail.

Finally, I found out that there was one missing piece of configuration information in the nginx configuration file: fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

When the above information is not configured, nginx will not send the php file address to be parsed to phpfpm, so the page will always be blank and there will be no parsing error message. Articles you may be interested in: About the organizational structure of nginx+php-fpm configuration file Blank page problem occurs when fastcgi_param runs php under nginx When running php program under nginx, 200 is returned, but the page is blank



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