找不到驱动程序 - PHP和SQLServer

时间:2015-12-01 11:48:09

标签: php sql-server pdo wamp

我已完成链接PDO MSSQL Server - Driver not found的每一步,并继续提供以下消息:

  

“找不到司机”。

我不知道该怎么办。我正在使用:

Wamp
Apache Version: 2.4.9
PHP Version: 5.5.12
Server Software: Apache / 2.4.9 (Win32) PHP / 5.5.12

建议跟随代码@VolkerK的输出:

ini文件:C:\ wamp \ bin \ apache \ apache2.4.9 \ bin \ php.ini

extension=php_bz2.dll
extension=php_curl.dll
extension=php_com_dotnet.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_openssl.dll
extension=php_pdo_mysql.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_shmop.dll
extension=php_pdo_sqlsrv_53_ts.dll
extension=php_sqlsrv_53_ts.dll
extension=php_soap.dll
extension=php_sockets.dll
extension=php_sqlite3.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll

1 个答案:

答案 0 :(得分:0)

不是答案(还是?):

请运行

<?php
$ini = get_cfg_var('cfg_file_path');
echo '<p>ini file: ', $ini, "</p>\r\n";

$ini = file($ini,  FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
if ( !$ini ) {
    echo "<p>file($ini): no data</p>";
}
else {
    echo '<p>';
    foreach( $ini as $l ) {
        if ( preg_match('!^\s*extension=!', $l) ) {
            echo $l, "\r\n";
        }
    }
    echo '</p>';
}

add the output to your question text。 应该像

ini file: C:\develop\php\php.ini
extension=php_mysql.dll
extension=php_gd2.dll
extension=php_curl.dll
extension=php_pdo_mysql.dll
extension=php_mysqli.dll
extension=php_sqlite3.dll
extension=php_pdo_sqlite.dll