Database Driver MySQLi Error

31,018

Solution 1

I got this error as well some time ago and it took me quite a while to figure out a way how to solve that. Basically all you need to do is add an extension to your php envoirment. The following solution fits to a Microsoft Windows Server 2003 running Apache and MySQL:

  • Find out where your php folder is located on the server that moodle is running on. It is usually at c:\php.

  • Open php.ini. Within the file you will find ;extension=php_mysqli.dll. Delete the semicolon.

  • Save the file.

  • Restart Apache and go to your Moodle website.

Here we go, you shold be fine from now on ;) hope this helped!!

Solution 2

For my case: make sure the modules are a) installed b)enabled in php.ini

Solution 3

For those looking for an answer for LINUX

uncomment

;extension=mysqli.so

in 'Dynamic Extensions' section in file 'php.ini' located in php folder ('/etc/php/php.ini' in my case)

Solution 4

You need to install the following package php-mysql and then restart the Apache web server.

Share:
31,018
Admin
Author by

Admin

Updated on May 27, 2021

Comments

  • Admin
    Admin almost 3 years

    I am running Moodle test environment on Window Vista having PHP 5.2.10 and MySQL 5.1.36-Community. When I upgrade from Moodle 1.9.9 to 2.0, I am getting the following error.

    Error: database driver problem detected
    
    The site administrator should verify server configuration
    
    PHP has not been properly configured with the MySQLi extension so that it can communicate with MySQL. Please check your php.ini file or recompile PHP. MySQLi extension is not available for PHP 4.
    

    I also tried to change the dbtype='mysqli' in config.ini and still see same error.

    I would really appreciate if you can provide some suggestion to resolve this error.

    Thank you in advance.