Symptoms
Website showing blank page or Internal server error.
Cause
A blank page on a PHP-based website indicates that errors are currently occurring on the site, but they are not displayed in the browser, resulting 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.
Resolution
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.
Comments
0 comments
Article is closed for comments.