Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]

Modules and Plugins [+] Modules and Plugins [-]

cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]

cPAddons (Site Software) [+] cPAddons (Site Software) [-]

System Administration [+] System Administration [-]

Developer Software [+] Developer Software [-]

Back to All Documentation

Standardized Hooks: Troubleshooting

For cPanel & WHM 11.32

noteNote: The Standardized Hooks documentation is currently under revision. You should check back shortly for improvements to this information.


The Standardized Hooks system implements a new layer of complexity into cPanel & WHM. This can lead to unexpected behaviors by the system if you are not aware of when a hook is running and what it is doing.

This document lists important features and common contexts of failure.

Debug mode

One tool provided with cPanel & WHM for testing whether hooks are operable is the debug mode. You can activate this feature by setting debughooks in /var/cpanel/cpanel.config to 1 of 4 possible values:

Value Description
0 Log no debug data.
1 Display information about a hook as it is being executed. Do not include data.
2 Display information about a hook as it is being executed. Include data.
PICK Important: This setting can output a large amount of data.
3 Display information about every insertion point as it is getting run even if a hook is not defined.

This feature prints debugging information to usr/local/cpanel/logs/error_log. Enabling this feature can generate a considerable amount of noise in the error log. You should only enable debugging mode on development systems or while troubleshooting an issue.

Can’t locate Module in @INC.

If a module hook states that it cannot find a particular module, as follows:

warn [wwwacct] Can't locate in @INC (@INC contains: /usr/local/cpanel /usr/local/cpanel/lib64/perl5/site_lib/x86_64-linux /usr/local/cpanel/lib64/perl5/site_lib /usr/local/cpanel/lib64/perl5/5.12.2/x86_64-linux /usr/local/cpanel/lib64/perl5/5.12.2 /var/cpanel/perl5/lib /usr/local/cpanel/lib64/perl5/cpanel . /var/cpanel/perl5/lib) at /var/cpanel/perl5/lib/ line 3.

The reason for this error may also be that a module hook is claiming a syntax error but passes perl -c. This occurs because cPanel & WHM's internal Perl runs version 5.6.2, while the system's Perl version is 5.8.8 or higher.

Topic revision: r9 - 21 Mar 2012 - 13:51:58 - Main.JustinSchaefer
SoftwareDevelopmentKit.TroubleshootingStandardizedHooks moved from Sandbox.TroubleshootingStandardizedHooks on 01 Nov 2011 - 21:27 by Main.JustinSchaefer - put it back