Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to install Wordpress 3.1 on PHP 5.3 (under IIS 7.5), but before getting to the configuration page it's throwing this error:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

Typically, that means to me that the MySQL driver hasn't been loaded, so I checked my phpinfo() for the correct php.ini file, and verify the path to the extensions directory is correct, which it is (C:\PHP). I noticed in the phpinfo() that the mysql and mysqli libraries were not loaded, but mysqlnd was. Are there incompatibilities with mysqlnd?

share|improve this question
    
Microsoft has the Web Platform Installer (WPI). This will install Wordpress, MySQL and do all your server configuration for you via wizard. Pretty convenient if you are trying to get up and running quickly for testing purposes. –  mrtsherman May 25 '11 at 20:10
    
Thanks for the suggestion. I'm aware of the the WPI, but PHP is already installed on this box for other applications, and I'm just trying to get it to work. –  MikeSmitty May 25 '11 at 21:23
    
It's installed for other IIS applications, rather. Maybe there is a problem with IIS reading the PHP modules or something. I hate dealing with PHP on IIS this way. –  MikeSmitty May 25 '11 at 21:32

2 Answers 2

mysqlnd is a client library, a replacement for libmysql. It is not a PHP extension, and does not provide the necessary functions for PHP to talk to a MySQL server.

You must enable the mysql extension in your php.ini file in order to talk to a MySQL server from WordPress.

share|improve this answer
    
So... it's a client library, but it doesn't allow you to connect to a MySQL server? Maybe I'm misunderstanding the precise definitions, but I thought that is what a client library allowed you to do. And since it shows up in the list of PHP modules on phpinfo() I would assume it would be a PHP extension. –  MikeSmitty May 25 '11 at 21:23
    
@Mike It's a client library, yes. It is not a PHP extension. It does allow programs to talk to MySQL (4.1 or newer), but PHP code cannot interact with it because it was not compiled with the necessary hooks &c. required to make it a PHP extension. Thus, you need a PHP extension that essentially "wraps" the client library and allows your PHP code to work with it. However, even if it were an actual PHP extension, it is not the mysql extension, and thus it is very unlikely to have the exact same functions (with identical signatures) that WordPress is expecting, and thus would not work anyway. –  Kromey May 25 '11 at 21:39

This is what I have in my php.ini file for my Wordpress on IIS installation. Found at very bottom of file. The dll's are in the php/ext directory. Hope this helps.

[PHP_MSSQL]
extension=php_mssql.dll
[PHP_MYSQL]
extension=php_mysql.dll
[PHP_MYSQLI]
extension=php_mysqli.dll
[PHP_PDO]
extension=php_pdo.dll
[PHP_PDO_MYSQL]
extension=php_pdo_mysql.dll
[PHP_PDO_SQLITE]
extension=php_pdo_sqlite.dll
share|improve this answer
    
Remember to restart IIS after modifying the .ini file –  mrtsherman May 26 '11 at 18:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.