开发者

Why PHP CLI says php_pdo.dll cannot be found?

开发者 https://www.devze.com 2022-12-13 18:57 出处:网络
I have added php extensions directory (which contains php_pdo.dll, ...) to path environment variables, still when launching php.exe on command line, it complains it cannot find this dll and oth开发者_

I have added php extensions directory (which contains php_pdo.dll, ...) to path environment variables, still when launching php.exe on command line, it complains it cannot find this dll and oth开发者_如何学Pythoners.

What's wrong ?

Thanks.


Look for "extension_dir" directive from phpinfo() output and save your proper extension DLL to that directory.

You can change extension directory from extension_dir directive in php.ini.


Do you install it during the PHP installation?

Here's how you can do it on Windows, make sure you enable the appropriate extension.

alt text http://lh4.ggpht.com/_SDci0Pf3tzU/SgBXLClDWEI/AAAAAAAAEuI/TgnBA_SEHFs/s400/pear%20install.jpg


In more recent versions of PHP, php_pdo.dll isn't needed because it is included in the core php binary.

However, if you did what I did and kept your previous php.ini file when upgrading PHP, the CLI will fail because you still have the reference to the extension in your ini file uncommented.

Commenting this out will make this error go away.

0

精彩评论

暂无评论...
验证码 换一张
取 消