Difference between revisions of "Enabling Error Reporting"
m |
|||
Line 31: | Line 31: | ||
If the admin area still allows you to navigate to '''General Settings''', follow the steps below to enable error display. Then, retry the steps that previously led to the blank or partially rendered page. The system will display additional error information. | If the admin area still allows you to navigate to '''General Settings''', follow the steps below to enable error display. Then, retry the steps that previously led to the blank or partially rendered page. The system will display additional error information. | ||
− | # Navigate to '''Setup > General Settings > Other'''. | + | # Navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > General Settings > Other''' or, prior to WHMCS 8.0, '''Setup > General Settings > Other'''. |
# Select the '''Display Errors''' checkbox at the bottom of the page. | # Select the '''Display Errors''' checkbox at the bottom of the page. | ||
# Click '''Save Changes'''. | # Click '''Save Changes'''. | ||
Line 57: | Line 57: | ||
If you enabled error reporting via the admin area, make sure to follow the steps below after you finish troubleshooting: | If you enabled error reporting via the admin area, make sure to follow the steps below after you finish troubleshooting: | ||
− | # Navigate to Setup > General Settings > Other. | + | # Navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > General Settings > Other''' or, prior to WHMCS 8.0, '''Setup > General Settings > Other'''. |
# Deselect the Display Errors checkbox at the bottom of the page. | # Deselect the Display Errors checkbox at the bottom of the page. | ||
# Click Save Changes. | # Click Save Changes. | ||
Line 84: | Line 84: | ||
If you have sufficient access and have configured your server to use WHM for administration, follow these steps: | If you have sufficient access and have configured your server to use WHM for administration, follow these steps: | ||
− | # In WHM, navigate to Software >> MultiPHP INI Editor. | + | # In WHM, navigate to '''Software >> MultiPHP INI Editor'''. |
# Click the Editor Mode tab. | # Click the Editor Mode tab. | ||
− | # Select your PHP version from the Select a PHP version menu. | + | # Select your PHP version from the '''Select a PHP version''' menu. |
# Scroll down to the <tt>error_reporting</tt> setting. | # Scroll down to the <tt>error_reporting</tt> setting. | ||
# Change the value to the following string: | # Change the value to the following string: | ||
<source lang="sql">E_ALL & ~E_WARNING & ~E_USER_WARNING & ~E_NOTICE & ~E_USER_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_USER_DEPRECATED</source> | <source lang="sql">E_ALL & ~E_WARNING & ~E_USER_WARNING & ~E_NOTICE & ~E_USER_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_USER_DEPRECATED</source> |
Revision as of 16:04, 5 August 2020
Contents
Getting Error Information
The WHMCS Error_Management system includes many useful options. The Display Errors option allows you to view additional information about critical errors.
When Should You Enable Display Errors
The Display Errors option provides additional information when you experience a critical error that results in one of the following issues:
- Friendly "Oops!" pages
- Entirely blank pages
- Partially rendered pages
In most cases, use the Log Errors and SQL Debug Mode options first. These options will usually capture the same information that the Display Errors option renders. In the event that these options are not viable or do not yield any information, Display Errors is a good alternative.
The Display Errors option is very helpful. However, it will show your error information to anyone who is encountering the same error condition. Avoid showing errors to visitors or non-privileged staff whenever possible.
Typical Causes
Some of the most common causes of "Oops!", partial, or empty page rendering include:
- Missing or corrupted files or incomplete uploads.
- The server doesn't meet the minimum system requirements.
- PHP, Apache or ionCube Loader®-related errors.
- Incompatible hooks or addons.
- Syntax errors in custom modules, hooks, or templates.
Enabling Error Reporting
Enabling From The Admin Area
If the admin area still allows you to navigate to General Settings, follow the steps below to enable error display. Then, retry the steps that previously led to the blank or partially rendered page. The system will display additional error information.
- Navigate to Configuration () > System Settings > General Settings > Other or, prior to WHMCS 8.0, Setup > General Settings > Other.
- Select the Display Errors checkbox at the bottom of the page.
- Click Save Changes.
Remember to disable Display Errors when you are finished troubleshooting. Leaving error display enabled can be a security concern.
Enabling From Your Configuration File
If the error is severe enough, you may not be able to log in 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.
Add the lines to the end of the configuration.php file. This will be immediately before the closing PHP tag (?>) if your configuration.php file has one. If it doesn't, this will be after the last line in the file.
$display_errors = true;
After adding the lines and saving and uploading the file, retry the steps that previously led to the blank or partially rendered page. The system will display additional error information.
Remember to disable Display Errors when you are finished troubleshooting. Leaving error display enabled can be a security concern.
Disabling Error Reporting
Disabling from the admin area
If you enabled error reporting via the admin area, make sure to follow the steps below after you finish troubleshooting:
- Navigate to Configuration () > System Settings > General Settings > Other or, prior to WHMCS 8.0, Setup > General Settings > Other.
- Deselect the Display Errors checkbox at the bottom of the page.
- Click Save Changes.
Disabling from the configuration.php file
If you enabled error reporting via the configuration.php file, make sure to remove the following line from the configuration.php file after you finish troubleshooting.
$display_errors = true;
Sometimes, you may also see the following lines in configuration.php file:
$display_errors = E_NOTICE;
$display_errors = E_ALL;
As a precaution, remove any lines starting with $display_errors from the configuration.php file.
PHP Warnings and Notices
If the Display Error options are disabled and you're still seeing warning messages, it indicates the Error Reporting level in your server's PHP configuration is too high. This is a PHP configuration level issue. Shared hosting or reseller users may require the assistance of the hosting provider.
If you have sufficient access and have configured your server to use WHM for administration, follow these steps:
- In WHM, navigate to Software >> MultiPHP INI Editor.
- Click the Editor Mode tab.
- Select your PHP version from the Select a PHP version menu.
- Scroll down to the error_reporting setting.
- Change the value to the following string:
E_ALL & ~E_WARNING & ~E_USER_WARNING & ~E_NOTICE & ~E_USER_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_USER_DEPRECATED