Guides & Tutorials8.6 UpdateTroubleshootingFatal error: Uncaught Error: Class "Laminas\ZendFrameworkBridge\Autoloader" not found

Fatal error: Uncaught Error: Class "Laminas\ZendFrameworkBridge\Autoloader" not found

Symptom

After switching to PHP 8.1, you may see a Class not found error when accessing the WHMCS index page or admin dashboard:

Fatal error: Uncaught Error: Class  "Laminas\ZendFrameworkBridge\Autoloader" not found in  /path/to/whmcs/vendor/laminas/laminas-zendframework-bridge/src/autoload.php:9

Cause

The OPCache PHP extension is enabled on your server and contains stale cache data.

Solution

Deactivate the OPCache extension from your website's PHP configuration.

You may need to contact your server admin/hosting provider for assistance in making this change. Instructions for some common control panels are below: