nginx showing blank PHP pages nginx showing blank PHP pages nginx nginx

nginx showing blank PHP pages


replace

include fastcgi_params;

with

include fastcgi.conf;

and remove fastcgi_param SCRIPT_FILENAME ... in nginx.conf


For reference, I am attaching my location block for catching files with the .php extension:

location ~ \.php$ {    include /path/to/fastcgi_params;    fastcgi_pass  127.0.0.1:9000;    fastcgi_index index.php;    fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;}

Double-check the /path/to/fastcgi-params, and make sure that it is present and readable by the nginx user.


Also had this issue and finally found the solution here. In short, you need to add the following line to your nginx fastcgi config file (/etc/nginx/fastcgi_params in Ubuntu 12.04)

fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;