Logs in WHMCS

WHMCS suppresses non-critical warnings and errors and attempts to complete all requested actions by default. However, if an error is critical, results in an error page, or you enable error reporting, the system will record error details in the appropriate log.

Logged errors may include uncaught exceptions or PHP errors, warnings, and notices that you observe due to the effective error reporting level.

The location of the log entry may vary based on the time of the error and any configured logging options.
The amount of detail that the system logs depends on several settings. For more information, see Errors in WHMCS and Enabling Error Reporting.

Activity Log

If you want WHMCS to record uncaught exceptions or observed PHP errors, warnings, and notices to the Activity Log, enable Log Errors in the Other tab at Configuration () > System Settings > General Settings.

Logging to the Activity Log requires a full initialization of the WHMCS core with an active connection to the database. If the error condition occurs prior to meeting these prerequisites, then the error will only propagate to the Environment Log.

If you want WHMCS to record MySQL® query error and warning conditions, enable SQL Debug Mode in the Other tab at Configuration () > System Settings > General Settings. This setting has the same prerequisites and behavior pattern as Log Errors.

Environment Log

As part of the initialization process, the system registers an error log handler to the web server environment error log. The system provides this logging channel to ensure error traceability, regardless of your effective Log Errors setting. The system defines the environment error log destination target at the environment level and WHMCS doesn’t control it. Typically, this is the Apache® error log, but may be different in your environment.

WHMCS will always attempt to log the observed errors and uncaught exceptions to this log if possible. If the error condition happens before WHMCS can register its error log handler, then the system uses the web server environment settings.

Module Log

The Module Log records raw responses from module-related issues. This logging includes payment gateway modules, server and provisioning modules, and domain registrar modules.

  • Module Command Errors are from the relevant module, not from WHMCS. To troubleshoot these errors further, you may need to consult your module provider’s documentation or contact their technical support.
  • Unknown Errors in the Module Log are errors that WHMCS does not recognize.

To use the Module Log:

  1. Go to Configuration () > System Logs and click Module Log.
  2. Set Module Logging to On.
  3. Reproduce the issue.
  4. Refresh the Module Log at Configuration () > System Logs.
  5. When you are finished troubleshooting, set Module Logging to Off.

To use the Module Log:

  • Your administrator role must include the View Module Debug Log permission.
  • You must temporarily grant the DROP privilege to the WHMCS database user. For more information, see Database Privileges.

Last modified: October 30, 2024