Errors in WHMCS
WHMCS suppresses non-critical warnings and errors and attempts to complete all requested actions by default. If an error condition is critical and the continued execution of a requested action is potentially detrimental or impossible, the system will display a styled error page and log the event.
- For information about WHMCS’s error logs, see Logs in WHMCS.
- For information about customizing error pages in WHMCS, see Error Pages.
Error Reporting
WHMCS provides multiple levels of control to affect errors and their management:
Environment Errors
The lowest level control is the environment level. WHMCS cannot manipulate this level. The control options and methods to use to modify them are specific to your web server environment. Usually, ini
settings control these and the PHP binary that Apache® uses consumes them. While WHMCS cannot alter these environment settings, it must use them while reading the first few code directives.
Unless there is a very rudimentary issue with the environment or access to files that WHMCS uses, you should not need this level of control. Our default recommendation for production environments is to set the display_errors
and error_reporting
directives to 0
.
Configuration File Variables
configuration.php
file. They can cause security concerns, premature exits, or otherwise prevent normal production behavior.The system reads the configuration file (configuration.php
in the application’s deployment directory) very early in the process.
You can specify the following error-related variables:
$display_errors
controls whether details about the error will appear in the friendly error page.$error_reporting_level
controls the sensitivity of observed PHP errors, warnings, and notices.
For more information, see:
Display Errors
When you are troubleshooting issues, you can enable the display of additional error information.
- Enable this using the Display Errors setting in the Other tab at Configuration () > System Settings > General Settings.
- This value takes precedence over the
$display_errors
setting in theconfiguration.php
file.
Last modified: October 30, 2024