MySQL doesn't work !


Remonter

Contacts :

Nicolas


Connexion phpMyAdmin ou mysql ne fonctionnent pas !

Error:

Fatal error: Call to undefined function mysqli_connect()
phpMyAdmin or mysql connection don't work !

or

 

Note: The information in this faq is specific to PHP 5. PHP 5 no longer enables MySQL by default (nor does it bundle the MySQL Client libraries). Instead, you'll need to manually install this extension, just like you do with most every other extension. Here's an official FAQ on why:   
http://php.net/manual/en/faq.databases.php#faq.databases.mysql.php

Resolution

  1. Check php.ini to enable the extension php_mysql.dll or php_mysqli.dll
        ;extension=php_mysql.dll
        ;extension=php_mysqli.dll
    uncommented in your php.ini file (by removing the leading semicolon)
  2. Copy libmysql.dll in php folder where  is php-cgi.exe
  3. Copy php_mysql.dll in php folder where  is php-cgi.exe

Troubleshooting

If you specified extension path in php.ini file (i.e.: extension_dir = "E:\PHP_5.0.3\ext\", librairies con't be load.
php-cgi.exe must be in the same folder !

Note: you can find this dll in php-5.0.3-Win32.zip, these dll are not include in php-5.0.3-installer.exe package ! Plese refer to this url http://www.php.net/downloads.php


Dernière mise à jour : juin 2019