Enable Error Reporting
For many types of issue, the first step in troubleshooting is enabling WHMCS’s error reporting system.
- We strongly recommend that you only enable error reporting while you are actively troubleshooting an issue. Disable it as soon as you are finished.
- Error reporting will display verbose error information to anyone on your system who experiences an error, including customers and non-privileged admins. This can become a security concern.
What does error reporting do?
When you enable error reporting, you can easily log and view additional information about the following types of error:
Oops!
errors.- Display issues, like blank or partially-rendered pages.
- Some PHP errors.
- Some system cron issues.
- Database errors.
Enable Error Reporting
You can enable error reporting in the Admin Area or from the configuration.php
file.
In the Admin Area
To enable error reporting from the Admin Area:
- Go to Configuration () > System Settings > General Settings.
- Choose the Other tab.
- Select Display Errors.
- Click Save Changes.
- Retry the steps that previously led to the problem. The system will display additional error information.
- When you are finished troubleshooting, disable Display Errors.
In the Configuration File
If the error is severe enough, you may not be able to log in to the Admin Area. In those situations, you can enable error reporting in the configuration.php
file in the WHMCS root directory.
To do this:
Open the
configuration.php
file in your preferred editor.Add the following line immediately before the closing PHP tag (
?>
):$display_errors = true;
For more information, see The configuration.php File.Save your changes.
Retry the steps that previously led to the problem. The system will display additional error information.
When you are finished troubleshooting, remove the
$display_errors
line from theconfiguration.php
file or disable Display Errors in the Other tab at Configuration () > System Settings > General Settings.Sometimes, you may also see the following lines in theconfiguration.php
file:$display_errors = E_NOTICE;
$display_errors = E_ALL;
$display_errors
from theconfiguration.php
file.
PHP Error Reporting
If the Display Errors feature is disabled and you’re still seeing warning messages, it indicates that the Error Reporting level in your server’s PHP configuration is too high. This is a PHP configuration level issue.
To resolve this issue on cPanel & WHM servers:
In WHM, go 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
If you have set it correctly, the error_reporting
variable within the server’s PHP configuration will show a numerical value of 4597
.
Last modified: October 25, 2024