Reputation:
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.
Upvotes: 5
Views: 39132
Reputation: 1
it is also connected to the OS path. you should add the php installed path to the general paths line. For this, This PC->Properties->Advanced system settings-> Enviroment variables->System variables->Path select Edit button select New button Paste php installed directory #For example c:\php save every windows reload apache
Upvotes: -1
Reputation: 3606
I am Using Xammp and runing multiple PHP versions, I found I needed to update my php.ini
file to point to the correct extension directory.
Find the key line:
; extension_dir = "./"
; On windows:
extension_dir = "C:\xampp\php-5460\ext" ;<--- make sure this is correct
Upvotes: 0
Reputation: 359
I have the same problem. After enabling mysqli extension in php.ini by removing the ';' from the following line:
;extension=mysqli
Nothing changed up to now. Then I saw a post on the net that said you have to install php-mysqlnd package. After installing it using following command the problem resolved:
sudo apt install php-mysqlnd
Upvotes: 0
Reputation: 1
You need to install the following package php-mysql and then restart the Apache web server.This is resolved my issue.
Upvotes: 0
Reputation: 6492
You need to install the following package php-mysql
and then restart the Apache web server.
Upvotes: 2
Reputation: 119
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)
Upvotes: 3
Reputation: 6784
For my case: make sure the modules are a) installed b)enabled in php.ini
Upvotes: 2
Reputation: 6469
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!!
Upvotes: 6