Enabling Error Reporting
When Should You Enable Error Reporting
Error reporting is useful when you are experiencing a critical error that is resulting in either:
- Entirely blank pages
- Partially rendered pages
Some of the most common causes of partial or empty page rendering include:
- Missing or corrupted files / incomplete uploads
- Server not meeting minimum system requirements
- PHP, Apache or Ioncube related errors
- Incompatible hooks or addons
- Syntax errors in custom modules, hooks or templates
If you can access the Admin Area
If the admin area is functioning enough to allow you to navigate to General Settings follow these steps to enable error display. Then retry the steps that previously led to the blank or partially rendered page and further error information should be displayed.
- Navigate to Setup > General Settings > Other
- Tick the Display Errors checkbox located towards the bottom of the page
- Click Save Changes
Remember to return here and uncheck Display Errors when you are finished troubleshooting. Leaving error display enabled can be a security concern.
If you are unable to access the Admin Area
If the error is severe enough, you may find you are unable to login to the admin area. In those situations, there is a manual configuration file flag option that you can add to the configuration.php file in the WHMCS root directory to enable error reporting.
The lines needs to be added at the very end of the configuration.php file, right before the closing PHP tag ?> if your configuration.php file has one, otherwise just the last line in the file.
$display_errors = true; $display_errors = E_ALL ^ E_NOTICE;
After adding the lines and saving/uploading the file, retry the steps that previously led to the blank or partially rendered page and further error information should be displayed.
Again remember to return here and remove these lines when you are finished troubleshooting. Leaving error display enabled can be a security concern.