11

nginx is connecting to php-fpm over fastcgi, using the standard /etc/nginx/fastcgi_params in the location block.

When connecting to /.status (php-fpm.ini::ping.path) from the command line with cgi-fcgi -bind, the result comes back as expected (X-Powered-By set, response body, etc).

When requesting with nginx, the result comes back empty (X-Powered-By set, no body length or content). nginx returns 200, since it got a "valid" response.

Watching over tcpdump, I've isolated the requests to parity in their FCGI headers (minus user-related env variables still set by the shell.)

2
  • Try changing to the user nginx runs as, and rerun the cgi-fcgi -bind test. Commented Apr 1, 2015 at 0:11
  • I always screw up NRPE deployments by testing them as root... figured you might have done the same. Commented Apr 1, 2015 at 0:12

2 Answers 2

12

The standard factcgi_params file doesn't contain the key line for SCRIPT_FILENAME.

location ~ \.php$ { include fastcgi_params; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; } 

Add it and restart nginx.

5

Well, your question is a bit vague. A so called “white screen of death” (WSOD) might be triggered by an endless amount of things. But some things I do if I encounter this:

  • Activate the following in your php.ini:

    display_errors = 1 display_startup_errors = 1 error_log = /path/to/file error_reporting = -1 ; (the -1 activates absolutely everything) log_errors = 1 
  • Activate in your php-fpm.conf:

    error_log = /path/to/file 
  • Activate for each php-fpm pool configuration:

    catch_workers_output = 1 
  • Repeat your request and check all logs (incl. nginx error log)
  • Increase logging level (e.g. debug on nginx)

If nothing of this helps you to pin-down the problem then please post your complete system information and configurations. Nobody is able to give you a precise answer without that.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.