php displays blank page despite error reporting = On

The network is the forum.

Moderators: Steel, notfred

php displays blank page despite error reporting = On

Postposted on Thu Nov 11, 2010 8:14 am

I had a Wordpress site on a Debian VPS, it was working fine with Apache and PHP, except that Apache kept on running out of RAM and getting killed. So I switched to nginx instead. NGInx requires something called php5-fpm to work with PHP. So I installed it, and it ran. But every php page now shows up completely blank. /var/log/php5-fpm.log shows nothing interesting, even when set to debug level logging. I made sure to tell NGInx to pass PHP to 127.0.0.1:9000 too:
/etc/nginx/sites-available/default
Code: Select all
server {
        listen   80;
        server_name  localhost;

        access_log  /var/log/nginx/localhost.access.log;

        location / {
                root   /var/www;
                index  index.php index.html index.htm;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
                #proxy_pass   http://127.0.0.1;
        #}

        #pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

        location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
                include fastcgi_params;
        }

Looks OK, right? I then saw that PHP blank pages mean you need to set error reporting = On in php.ini, which is fine except that in /etc/php5, there are this many php.ini files:
Code: Select all
server:/etc/nginx/sites-available# cd /etc/php5
server:/etc/php5# find . -name php.ini
./cli/php.ini
./fpm/php.ini
./apache2filter/php.ini
./cgi/php.ini
./apache2/php.ini

I set display_errors = On in fpm/php.ini, and in cli/php.ini, and in cgi/php.ini. Then I restarted php5-fpm. Still a blank page. Not even a simple <?php phpinfo(); ?> page works. What should I do?
Mothership: Thuban 1055T@3.7GHz, 12GB DDR3, M5A99X EVO, GTX470+Icy Vision Rev.2@840/3800, Vertex 2E 60GB
Supply ship: Sargas@2.8GHz, 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Macbook Air Ivy Bridge
Crayon Shin Chan
Minister of Gerbil Affairs
 
Posts: 2208
Joined: Fri Sep 06, 2002 10:14 am
Location: Malaysia

Return to Networking

Who is online

Users browsing this forum: No registered users and 2 guests