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?

  • Update: now some scripts are working, but phpBB is still returning blank pages. How can I diagnose/fix this issue? – Kudu Apr 13 '11 at 21:13
  • Finally got lazy and used the php-fpm PPA. – Kudu Apr 19 '11 at 13:48

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
  • 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

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.

  • Thanks, but that's not it - I'm trying to get phpBB to work, and it uses long/regular <?php ?> tags – Kudu Apr 13 '11 at 20:40
  • Do you have display_errors = On in your php.ini? – Paxxil Apr 14 '11 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.