PDO drivers no value in Windows

后端 未结 16 1404
盖世英雄少女心
盖世英雄少女心 2020-11-29 07:31

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

相关标签:
16条回答
  • 2020-11-29 07:39

    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.

    0 讨论(0)
  • 2020-11-29 07:40

    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"
    
    0 讨论(0)
  • 2020-11-29 07:41

    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"
    
    0 讨论(0)
  • 2020-11-29 07:42

    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.

    0 讨论(0)
  • 2020-11-29 07:42

    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.

    0 讨论(0)
  • 2020-11-29 07:46

    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());?>

    0 讨论(0)
提交回复
热议问题