Guides & TutorialsTroubleshootingTroubleshooting UpdatesTroubleshooting A "PHP Fatal error: Class not found" Error

Troubleshooting A "PHP Fatal error: Class not found" Error

Encountering an error similar to that shown below indicates a core WHMCS file is missing:

PHP Fatal error: Class 'xxxx' not found in /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/Exception/Handler/ExceptionLoggingTrait.php on line 0
Click to copy

Where xxxx is the name of a particular function.

To resolve this kind of error, read on:

Begin by downloading the Full Release Files corresponding to your WHMCS version from:

https://download.whmcs.com

(If your licence is provided by a reseller, please contact them to obtain the files).

Upload the .zip file to your server using your preferred method (FTP, File Manger etc.)

 

Extract the contents of the .zip file, overwriting the existing WHMCS files.

Return to your WHMCS installation and the error should no longer occur.

The files could also be rendered inaccessible by inappropriate file/folder permissions or user/group assignment. Ensure that file and folder permissions are set correctly to allow all WHMCS files to be read by PHP. Please speak with your server admin/hosting provider to check the appropriate settings for your server environment.

If the error reoccurs a short time after re-uploading files, this indicates a server-side security measure is erroneously removing the file. Please speak with your server admin/hosting provider to adjust the security rule so as not to remove or quarantine the file.