Bobcares

MySQLi extension missing phpMyAdmin – Quick fix!

by | Dec 11, 2019

Are you receiving MySQLi extension missing error in phpMyAdmin? Here’s how we fix it.

Usually, this error happens when MySQLi extension is not enabled in the php.ini file.

At Bobcares, we often receive requests to fix MySQLi extension missing errors as part of our Server Management Services.

Today, let’s analyze the error and see how our Support Engineers fix it for our customers.

What is MySQLi extension missing phpMyAdmin error?

Before getting deeper into the error, firstly, let’s understand what is MySQLi extension missing in phpMyAdmin?

The MySQLi functions allow us to access MySQL database servers and it’s a relational database driver used in the PHP scripting language. If the MySQLi extension is present we get this error.

A sample error at PHPMyAdmin will look like

 

How we fix the MySQLi extension missing phpMyAdmin?

So far, we have seen what is MySQLi extension missing in phpMyAdmin error. The solution for this error is to enable the MySQLi extension on the server.

Let’s see the different ways our Support Engineers fix this error for our customers by enabling MySQLi extension.

 

Enable MySQLi extension in php.ini file

First, we verify that the extension in PHP modules is enabled or not. For this, we run this command:

php -m | grep -i mysqli

Let us discuss how our Support Engineers enable the MySQLi extension from the php.ini file in Linux and Windows.

In Linux

1. First, we open the php.ini file (/etc/php/php.ini​)

2. Then we search for the commented line :

#extension=php_mysqli.so

3. And, we uncomment the line by removing the hashtag from the beginning, such as:

extension=php_mysqli.so

At last, we restart the webserver.

 

In windows

1. We open the php.ini file

2 Then we search for the commented line:

#extension=php_mysqli.dll

3. And, we uncomment the line by removing the hashtag from the beginning, such as:

extension=php_mysqli.dll

Thus enabling it resolved the error.

 

Enable MySQLi using EasyApache4

The simplest way to enable MySQLi is from EasyApache. Let us discuss how our Support Engineers enable it from EasyApache.

1. First, we login to the WHM as root.

2. Then we search for “EasyApache4” or go to Software > EasyApache4

 

 

3. At the top look for “Currently Installed Packages” and we click on the button “Customize”

4. Then on the left panel section, we click on “PHP Extensions”

5. After this, we search for mysqlnd.

6. We see something like “php70-php-mysqlnd” (depend on the PHP versions). We enable it.

7. Click on Review and and click on Provision button.

 

Enable MySQLi extension on web-server without any panel.

Our Support Engineers also provide a solution for the customers who are not using any panels. To enable MySQLi extension in the server without panel. We run the below command such as

# ./configure --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config

Then after, we check the MySQLi extension is enabled on the server.

 

Conclusion

In short, The error is mainly due to the missing of MySQLi extension in the php.ini file. Today we saw how our Support Engineers resolve the error MySQLi extension missing on PHPMyAdmin and the different ways to enable the MySQLi extension.

8 Comments

  1. Ravindu

    Thanks! Instead of “php_mysqli.so” I have put “mysqli.so” only.

    Reply
  2. Dimitri

    NICE! Thanks

    Reply
    • Maheen Aboobakkar

      You are welcome Dimitri

      Reply
  3. April Pradhan

    How do i even get to the php file?

    Reply
    • Maheen Aboobakkar

      Hello,

      You can use any of the editor such as vi or nano to edit the php file in the location: /etc/php/php.ini​

      Reply
  4. Vidal

    bonojour,

    Mysqli est activé pourtant j’ai toujours le même problème.

    Reply
    • Hiba Razak

      Hi,

      Our Experts can help you with the issue, we’ll be happy to talk to you on chat (click on the icon at right-bottom).

      Reply
  5. Mark Gresin

    Just want to comment here that in PHP 8 (Windows) you can either enable the mysqli extension or you can set a path to php_mysqli.dll in the /ext folder. Either way will turn on. However you can not turn both on will produce a ‘Module “mysqli” is already loaded in Unknown on line 0’.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.