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.



Source link

Author

Write A Comment