The php_pdo_mysql.dll
can\'t be enabled in machine. I have set extension=php_pdo.dll
and extension=php_pdo_mysql.dll
enabled in php.in
On an Windows Server 2012, Apache 2.4, php 5.4 installation, after trying everything else changing this worked...
PHPIniDir "C:\php\"
to
PHPIniDir "C:/php/"
...guh.
I had this same problem when I upgraded to PHP 5.4. I had
extension_dir = "ext"
in php.ini and php -m
was starting fine and reporting that it loaded pdo_mysql, but when I ran phpinfo.php through apache, the driver was missing.
I fixed it by changing the extension_dir
to an absolute path. I'm guessing it got confused when running through Apache and made it relative to something else.
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "D:/php-5.4.11-Win32-VC9-x86/ext"
try the following: look for this in your php.ini and uncomment extension_dir = "ext"
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "ext"
I got hints here:
http://wiki.cementhorizon.com/display/CH/Solution+-+Unable+to+load+dynamic+library+C+php+ext+php_mysql.dll+-+the+specified+module+could+not+be+found
I made sure that I set c:/php
as a PATH variable and then moved the appropriate dlls into the c:/php
directory (from the c:/php/ext
directory).
All works for me now, though I'm not completely comfortable with moving things around the php directory.
I had this problem too. I have Apache/2.2.22 (Win32) PHP/5.3.23 on a Windows 7 machine. My solution was changing extension_dir = C:\Program Files (x86)\PHP\ext in the php.ini file to extension_dir = "C:\Program Files (x86)\PHP\ext". It just needed adding the quotation marks.
I also added the php directory to the CLASSPATH.
After change the php.ini configuration, need to restart Appche server in windows service. Then the extension module will be loaded. use following code to test :<?php print_r(get_loaded_extensions());?>