Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » PHP Fatal error: Class 'mysqli' not found

PHP Fatal error: Uncaught Error: Class 'mysqli' not found

This exception is thrown by PHP code if you are upgrading PHP version from older to newer one. Class 'mysql' not found error stops fetching database from mysql server, result may be harmful for your website; it may also affect user experience.

Screenshot of error logs generated on GoDady Cpanel

PHP Fatal error:  Uncaught Error: Class 'mysqli' not found

Above image of error logs clearly shows how PHP code is throwing exception - Class 'mysqli' not found

Step 1: Fix PHP Fatal error: Uncaught Error: Class 'mysqli' not found

Go to Cpanel and search for PHP Version and then click on 'Select PHP Version' link

Search PHP version in Go dady Cpanel

Step 2: Change PHP Version from 7.1 to 5.6

Choose 5.6 from dropdown menu and then press Set As Current Changing PHP version from 7.1 to 5.6 will fix this exception

Change PHP version from 7.1 to 5.6