OPcache Warnings

Problem

You are experiencing problems that relate to stale cached data or PHP script execution.

For example:

  • You may see the following error after upgrading to PHP 8.1: Fatal error: Uncaught Error: Class "Laminas\ZendFrameworkBridge\Autoloader" not found in /path/to/whmcs/vendor/laminas/laminas-zendframework-bridge/src/autoload.php:9
  • You may see the following error while trying to activate the PayPal Payments payment gateway module: Gateway Activation Failed

In WHMCS 8.12 and later, you may see an OPcache Status error in the Admin Area or an OPcache Status warning at Configuration () > System Health.

Cause

This warning indicates that the OPcache PHP extension is enabled.

We strongly discourage enabling OPcache on your WHMCS installation’s server.

OPcache can cause serious problems with old data caches that WHMCS cannot control. In some cases, its features can also prevent PHP scripts from running each time that WHMCS executes them. These issues can cause unexpected behavior in WHMCS.

For example, the Laminas error above indicates that the OPcache extension has caused stale cache data that is preventing Laminas from functioning correctly in PHP 8.1.

Solution

Deactivate the OPcache extension from your PHP configuration.

For assistance, see your control panel’s documentation, or contact your hosting provider or system administrator:

Last modified: December 4, 2024