PHP has not been properly configured with the MySQL extension

PHP has not been properly configured with the MySQL extension

by Jon Wong -
Number of replies: 6

Hi

I'm trying to make progress with the installation page (install.php)

I've got to the database section, and I get the error message

"PHP has not been properly configured with the MySQL extension so that it can communicate with MySQL. Please check your php.ini file or recompile PHP."

I'm using the latest version of php and mysql

I have already created the database using the following code:

CREATE DATABASE moodle;
  > GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER ON moodle.*
          TO moodleuser@localhost IDENTIFIED BY 'yourpassword';
  > quit

I use IIS6 and server 2003

Any ideas whats happening

Thanks in advance

jon

Average of ratings: -
In reply to Jon Wong

Re: PHP has not been properly configured with the MySQL extension

by Pamela McLeod -
Bump.  I'm having the EXACT same issue.  Can anyone help?
In reply to Pamela McLeod

Re: PHP has not been properly configured with the MySQL extension

by Pamela McLeod -
Solved my own problem (for once!) by using the php_mysql.dll extension rather than php_mysqli.dll (which is recommended by MySQL). 
In reply to Pamela McLeod

Re: PHP has not been properly configured with the MySQL extension

by Huw Smith -

I too am having the same problem, I have enabled the php_mysql.dll extension but I still get the "PHP has not been properly configured with the MySQL extension so that it can communicate with MySQL. Please check your php.ini file or recompile PHP" error when I try to configure the database during the Moodle installation.

I am using Windows XP SP2, MySQL 5.0.26 and PHP 5.1.6 - Any help would be greatly appreciated.

I have set Moodle up without any problems on Windows 2000 server and just wanted to set it up on my home PC just so that I can play with it and not have to worry about breaking the live site.

In reply to Huw Smith

Re: PHP has not been properly configured with the MySQL extension

by Ken Wilson -

Hi Huw

Can you please confirm the version of php_mysql.dll extension on your home PC? To do this, create a file in WordPad with this line:

<?php phpinfo(); ?>

Save the text file as phpinfo.php into your moodle folder, then load it into your browser (http://mymoodle/moodle/phpinfo.php).

Scroll down to the mysql section and look for the line "Client API version". Does it say 5.0.26? When php was installed, was the php_mysql.dll file used the one from PHP or from MySQL website?

Thanks

Ken

In reply to Ken Wilson

Re: PHP has not been properly configured with the MySQL extension

by Shelley Cridland -

we are getting the exact same error message - we have IIS 5.1 and and PHP 5.2.5  on a windows XP machine - loading for localhost use.

When running the info.php file no MySQL section shows up at all...I have made sure the Php_mysql.dll in the php.ini file is uncommented and that there is a php_mysql.dll file located in the /php/ext folder

I have also checked for the libmysql.php file which resided in the php file and it is present and accounted for...

Any other thoughts as to why this is not working???

Attached is the php.ini file

Shelley

In reply to Shelley Cridland

Re: PHP has not been properly configured with the MySQL extension

by Shelley Cridland -

Solved my own problem...found that there were 2 libmysql.dll files on the computer - once we reduced that down to just 1  - PHP finally recognized mysql

shelley