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 being output into the browser, which results as a white screen or an HTTP 500 error (Google Chrome). Common issues that can arise in a blank page can include, but not limited to:
- 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.
PHP errors would typically be found in an "error_log" found in the website content's document root. For cPanel accounts with only one domain name, they can be found in the following location:
If PHP-FPM is enabled for the account, the log location would be different:
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.