How to settle problems in Adminer

As you know Adminer is a parallel powerful database handling engine that works like phpMyAdmin.
Often we encounter a problem.
While upgrading our Linux system, we need to update the PHP or MySQL version. While doing this When we type: http://localhost/adminer.php to open Adminer, we encounter an error like this:

None of the supported PHP extensions (MySQLi, MySQL, PDO_MySQL) are available.

To handle this common error what can be done?
It can be solved by taking only two steps.

sudo apt-get install php7.0-mysqlnd

Next you have uncomment one line in ‘/etc/php/7.0/apache2/php.ini’. To do that open it in any editor;

sudo gedit /etc/php/7.0/apache2/php.ini

And just uncomment this line in Linux:


extension=msql.so

For Windows uncomment this line:


extension=msql.dll

That is all your Adminer will work fine.

Reconfigure Apache2 server with PHP 7

It’s a quite common problem that we face when we try to work around apache server and php.
Suppose you have just reconfigured your apache 2. Next you find that your php 7 script is not working any more with your php and no script is executed properly.
What will you do?

Open your linux terminal and type the following commands one after another. Usually
it works.

sudo apt-get install apache2 php7.0 libapache2-mod-php7.0

a2query -m php7.0

sudo a2enmod php7.0

sudo service apache2 restart

How to configure your apache 2 server with php 7

Suppose you have apache 2 server installed in your Ubuntu 14 and it came with php 5*. Now whenever you start apache 2 server typing localhost in your browser, you find that your apache server has not been configured with php 7.1.
Now how you’d solve this nagging problem?
First you need to remove every php version from your machine.

sudo apt-get purge php.*

Next you need to reinstall PHP 7 by these commands one after another:

sudo add-apt-repository ppa:ondrej/php

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php

sudo apt-get update

sudo apt-get install php7.1

sudo apt-get install php7.0-mysql

sudo apt install php libapache2-mod-php

sudo apt install php7.0-mbstring

It’s done. Now your apache server has been configured with php latest version.

How to install Adminer – alternative to phpmyAdmin

First download the latest Adminer into your Apache web servers root folder using this command:

sudo mkdir /usr/share/adminer

sudo wget "http://www.adminer.org/latest.php" -O /usr/share/adminer/latest.php

sudo ln -s /usr/share/adminer/latest.php /usr/share/adminer/adminer.php

echo "Alias /adminer.php /usr/share/adminer/adminer.php" | sudo tee /etc/apache2/conf-available/adminer.conf

Next you need two more lines:

sudo a2enconf adminer.conf

sudo service apache2 restart

Now open your browser and type:

http://localhost/adminer.php