5

I'm using php-fpm through Nginx.

My nginx.conf can be found here: http://pastebin.com/Nu9iD8Km
It includes a file found here: http://pastebin.com/ece4cwXF
My php-fpm.conf can be found here (all the options omitted are the default): http://pastebin.com/70fBE30E
My fastcgi_params file is similar to the default, but adds this line, following a recommendation on the web: fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

I keep getting blank pages instead of PHP scripts, but static stuff loads fine. What's weird is that I'm not getting 404 errors - my browser tells me that the status code is 200 OK.

Neither nginx or php-fpm's logs turn up anything interesting. What may be causing this?

How can I fix this?

Kudu
  • 247
  • 2
  • 4
  • 8

2 Answers2

7

My php section looks like this:

        location ~ \.php$ {
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_pass unix:/dev/shm/php-fastcgi.socket;
    }

My listen directive in php-fpm.conf this:

listen = /dev/shm/php-fastcgi.socket

Could you also provide your php-fpm.conf? If the error still exists, please enable logging in fpm and provide fpm logs:

php_admin_value[error_log] = /var/log/fpm-php.www.log
php_admin_flag[log_errors] = on
shakalandy
  • 778
  • 4
  • 10
  • Added php-fpm.conf to original question. The PHP log file (fpm-php.www.log) isn't even being created, so I guess it's not logging anything, since it doesn't return any file-related errors in the main FPM log. – Kudu Apr 13 '11 at 20:49
  • Now it's been created, due to a script error. – Kudu Apr 13 '11 at 21:13
  • ok, and still no errors inside the logfiles? Could you enable also "php_flag[display_errors] = on" in your php-fpm.conf? Afterwards, still white page and no error on your page neither in fpm-php.log or nginx error log? – shakalandy Apr 13 '11 at 21:17
3

I had similar issue - blank pages without warning - short_open_tag = On solved the problem. Check php.ini short_open_tag is it ON or OFF? If you use shortcuts like <?=$test?> or if you open tags with just <? it should be set to ON.

Paxxil
  • 181
  • 1
  • 10