php-fpm returning empty response to nginx

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.


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.