Troubleshooting PHP

If you encounter errors or issues with PHP in your WHMCS installation, see the sections below to start troubleshooting and resolve the issue.

For more information, see PHP Errors and Exceptions.

PHP Configuration

You may encounter the following common issues:

Error or IssueExplanationNext Steps
Allowed memory size of xxxxx bytes exhausted (tried to allocate xxxx bytes)WHMCS has reached maximum amount of memory available to PHP on your server.Allowed Memory Exhausted Errors
Fatal error: Uncaught Error: Class "Laminas\ZendFrameworkBridge\Autoloader" not found in /path/to/whmcs/vendor/laminas/laminas-zendframework-bridge/src/autoload.php:9The OPcache PHP extension is enabled on your server and contains stale cache data.Laminas Class Errors
Legacy Smarty Tags: The system detected that legacy Smarty tags may be in use and that the Allow Smarty PHP Tags setting is enabled.This error indicates that your system uses legacy Smarty PHP tags or Allow Smarty PHP Tags is enabled.Legacy Smarty Tags Errors
Gateway Activation FailedThis error often occurs because the OPcache PHP extension is enabled on the WHMCS installation’s server.PayPal Gateway Activation Failed Errors
PHP Fatal error: Class 'xxxx' not found in /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/Exception/Handler/ExceptionLoggingTrait.php on line 0A core WHMCS file is missing.ExceptionLoggingTrait Errors
Required function is not availableThis error indicates that a necessary function is not installed on the server or is disabled in the configuration.Required Function Errors
Segmentation faultThis error does not directly relate to the WHMCS software and can occur for many different reasons.Segmentation Fault Errors
TypeError: Return value of convertIniSize() must be of the type int Error, float returned in /path/to/whmcs/includes/functions.phpThe PHP configuration that WHMCS uses contains an invalid post_max_size value.TypeError convertIniSize Errors
TypeError: Return value of WHMCS\File::guessFileExtension() must be of the type string, null returned in /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/File.phpThe fileinfo function is missing or disabled in your server’s PHP configuration.TypeError convertIniSize Errors

PHP Version

For more information, see PHP Version Compatibility.

You may encounter the following common issues:

Error or IssueExplanationNext Steps
InvalidArgumentException: Data missing in /path/to/whmcs/cs/vendor/nesbot/carbon/src/Carbon/Carbon.php:425Your system’s PHP version is not compatible with your current WHMCS version.InvalidArgumentException Carbon Errors

Last modified: October 25, 2024