I receive an error about missing mysqli and mysql extensions. ΒΆ
To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension". This extension may be part of the PHP distribution (compiled-in), otherwise it needs to be loaded dynamically. Its name is probably mysqli.so or php_mysqli.dll. phpMyAdmin tried to load the extension but failed. Usually, the problem is solved by installing a software package called "PHP-MySQL" or something similar.
There are currently two interfaces PHP provides as MySQL extensions - mysql
and mysqli
. The mysqli
is tried first, because it's the best one.
This problem can be also caused by wrong paths in the php.ini
or using wrong php.ini
.
Make sure that the extension files do exist in the folder which the extension_dir
points to and that the corresponding lines in your php.ini
are not commented out (you can use phpinfo()
to check current setup):
[PHP] ; Directory in which the loadable extensions (modules) reside. extension_dir = "C:/Apache2/modules/php/ext"
The php.ini
can be loaded from several locations (especially on Windows), so please check you're updating the correct one. If using Apache, you can tell it to use specific path for this file using PHPIniDir
directive:
LoadFile "C:/php/php5ts.dll" LoadModule php5_module "C:/php/php5apache2_2.dll" <IfModule php5_module> PHPIniDir "C:/PHP" <Location> AddType text/html .php AddHandler application/x-httpd-php .php </Location> </IfModule>
In some rare cases this problem can be also caused by other extensions loaded in PHP which prevent MySQL extensions to be loaded. If anything else fails, you can try commenting out extensions for other databses from php.ini
.