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.)

David Souther
  • 227
  • 1
  • 2
  • 7

2 Answers2

13

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.

shukshin.ivan
  • 231
  • 3
  • 6
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.

kasperd
  • 30,455
  • 17
  • 76
  • 124
Fleshgrinder
  • 3,798
  • 2
  • 17
  • 20