PHP没有加载php_pdo模块

When I'm trying to start my Apache web server (on Windows7/Apache2.2.22/PHP5.2.17) with php_pdo.dll (and php_pdo_mysql.dll) modules enabled in PHP, I'm receiving this error:

Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_pdo.dll' - The specified module could not be found.

I've set the extension path (correctly) in php.ini and all .dll files exist in \ext\ folder.

uncomment ;extension=php_pdo.dll

use extension=php_pdo.dll without semi colon ;

Edit 1:

also extension=php_pdo_mysql.dll

I saved in apache/bin directory both php_pdo.dll and php_pdo_mysql.dll files and it`s working now! huh?!

This problem was caused for me by having XAMPP/PHP 5.4 and a lone-install of PHP 5.1 on the same system. XAMPP runs PHP under the C:\XAMPP\PHP folder by default, which is placed in the system path. But my older (and forgotten) install of PHP 5.1.2, which requires php_pdo.dll, was also in the path (prog files) and it's php.exe was responding to command-line PHP statements. So I was getting the old EXE running in the new folder structure, where there was no php_pdo.dll.

3 possible Solutions: 1. remove the old version of PHP. 2. change default programs for php (to point to xampp version). 3. explicitly specify the correct php for the project you are using.

I think any of those should work, but since I have no need for an older version of PHP I only tested the first one.. Hopefully this will give you somewhere to look, at least.