None of the supported PHP extension for adminer even after linking php with mysql
After updating my Debian system from Stretch to Buster, I have got the same error message on http://localhost/adminer/. The report page http://localhost/phpinfo.php, which essentially consists of <?php phpinfo(); ?>
, revealed that PHP 7.0 is used by apache2 though the newer PHP 7.3 is already installed on the system. Activating the newer PHP version made to work Adminer again. I guess that this works on Ubuntu just the same.
$ a2dismod php7.0
$ a2enmod php7.3
$ systemctl restart apache2
If Adminer says
None of the supported PHP extensions (MySQLi, MySQL, PDO_MySQL) are available
it means exactly that your PHP interpreter has no support for this extensions.
There are several reasons why you don't have MySQL support in PHP, but the most common one is that you missed to install the right packages.
PHP packages related to MySQL can be searched with this command:
apt-cache search php | grep -i mysql
The most important are:
php-mysql - MySQL module for PHP [default]
php7.1-mysql - MySQL module for PHP
I'm using Kubuntu 17.10 with PHP 7.1, you may have a different version, but the most important and common package is php-mysql.
First of all you have to check in all your installed packages which "php" ones are installed on your machine:
dpkg -l | grep php
You must find at least one of the two php-mysql. If not you can install it using this command:
sudo apt-get install php-mysql
Now you just have to restart your services.
If your are using PHP with Apache with prefork, you just have to restart your webserver. If you are using FastCGI, you have to restart php service.
The right command depends on your Ubuntu version, you may use systemctl or service command:
sudo systemctl restart <servicename>
sudo service <servicename> restart
where servicename can be one of "apache", "apache2", "php5-fpm" or "php7.1-fpm".