Personal computing discussed

Moderators: renee, Steel, notfred

 
Crayon Shin Chan
Minister of Gerbil Affairs
Topic Author
Posts: 2313
Joined: Fri Sep 06, 2002 11:14 am
Location: Malaysia
Contact:

php displays blank page despite error reporting = On

Thu Nov 11, 2010 9: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
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:
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: FX-8350, 12GB DDR3, M5A99X EVO, MSI GTX 1070 Sea Hawk, Crucial MX500 500GB
Supply ship: [email protected], 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Thinkpad X230

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On