Introduction
The blank page of a PHP-based website is an indication that there are currently errors occurring for the site, but the errors are not output into the browser, which results in a white screen or an HTTP 500 error (Google Chrome). Common issues that can result in a blank page can include, but are not limited to these:
- The PHP memory limit is reached.
- PHP modules are not loading or not installed.
- Issues with the coding of the files, or in some cases, the PHP file is just empty.
Procedure
PHP errors would typically be found in an error_log file found in the website content's document root. For cPanel accounts with only one domain name, they can be found in the following location:
/home/$cpuser/public_html/error_log
If PHP-FPM is enabled for the account, the log location is here:
/home/$cpuser/logs/
To gather the most recent information from the error_log file, the following command can be used:
tail -f -n0 /home/$cpuser/public_html/error_log
If you reload the website while running this command, you can see what errors are being generated. You can then use that information to correct the problem that is preventing your site from loading correctly. If no error is being generated, then there are a few possibilities. For instance, there is no PHP base error occurring, the error is being logged to a different file, or the content may not be resolving to the same server the checks are being performed.