Personal computing discussed

Moderators: Steel, notfred

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

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 too:
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
        #location ~ \.php$ {

        #pass the PHP scripts to FastCGI server listening on

        location ~ \.php$ {
                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

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

Who is online

Users browsing this forum: No registered users and 2 guests