Skip to content
Home » Web » PHP » How to Resolve Blank PHP Web Pages On Linux

How to Resolve Blank PHP Web Pages On Linux

Blank Web Page

When you met a blank PHP page on the browser, you might have no clue in the first place. But there was a possibility that the PHP page has errors but httpd server showed nothing instead of debug message.

The key property in /etc/php.ini to show the errors on the client is the directive "display_errors" which is "Off" by default on Linux for production servers.

You can change the value for development purposes.

[root@localhost ~]# vi /etc/php.ini
...
display_errors = On
...

Don't forget to restart httpd server to take effect.

[root@localhost ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

If you are sure that you have already turn on display_errors, there's only one possible left. Your program did have errors in the run-time, but you suppressed the errors somewhere in the code by "@" signs. Please check your code for sure.

Leave a Reply

Your email address will not be published. Required fields are marked *