Azad
Azad

Reputation: 21

OpenCart: Fatal Error: Class 'Mysqli' Line 7

I have problem for installation OpenCart in cPanel with Softacolous, when I'm finished for install and during open the site I have message:

Fatal error: Class 'mysqli' not found in /home/radiance/public_html/shoukhin/system/library/db/mysqli.php on line 7

==Info:== OpenCart: Version: 2.0.3.1, 1.5.6.4
Release Date: 29-05-2015

Anything more to solve or get ans? Anyone there to solve it?

Upvotes: 0

Views: 3525

Answers (3)

Jay Smoke
Jay Smoke

Reputation: 604

In cPanel, just goto your php version, make sure you are on 7.3 and enable nd_mysqli. That fixed it for me.

Upvotes: 0

Gursewak Singh
Gursewak Singh

Reputation: 822

I recently faced the same issue, that Class mysqli not found. And found out that this particular issue is not related to OpenCart. It is related to the PHP version that your OpenCart is using and the PHP version that your server is supporting.

So make sure sure PHP version mentioned during configuration is matched with PHP version that your server is running.

In my case my server was running PHP 7.4 and OpenCart was configured for PHP 7.3. So the problem was solved by changing my server's PHP version to 7.3.

And lived Happily forever after....

Upvotes: 0

kit
kit

Reputation: 11

Please install mysqli into your centos server .

To install mysqli using EachApache:

  1. Login to WHM as 'root' user.
  2. Either search for "EasyApache" or go to Software > EasyApache
  3. Scroll down and select a build option (Previously Saved Config)
  4. Click Start "Start customizing based on profile"
  5. Select the version of Apache and click "Next Step".
  6. Select the version of PHP and click "Next Step".
  7. Choose additional options within the "Short Options List"
  8. Select "Exhaustive Options List" and look for "MySQL Improved extension"
  9. Click "Save and Build"

Upvotes: 1

Related Questions