Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using php-fpm through Nginx.

My nginx.conf can be found here:
It includes a file found here:
My php-fpm.conf can be found here (all the options omitted are the default):
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?

share|improve this question
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
up vote 5 down vote accepted

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
share|improve this answer
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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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