IIS8 PHP问题MSSQL

IIS8 PHP问题MSSQL,php,sql-server,codeigniter,Php,Sql Server,Codeigniter,我在让PHP在IIS8服务器上与MSSQL一起工作时遇到了一个问题 我已经为PHP5.4php_pdo_sqlsrv_54_ts.dll和PHP_sql_srv_54_ts.dll加载了扩展 在phpinfo()中,我得到: cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--witho

我在让PHP在IIS8服务器上与MSSQL一起工作时遇到了一个问题

我已经为PHP5.4php_pdo_sqlsrv_54_ts.dll和PHP_sql_srv_54_ts.dll加载了扩展

phpinfo()
中,我得到:

cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" "--with-pgo"
我已经做了大量的搜索,并相应地配置了所有内容

如何让MSSQL与PHP一起正常工作

我知道它不是的唯一原因是codeigniter安装完全是空白的。。。我从以前的安装中知道这是一个数据库连接问题

注意:PHPinfo,也不显示在启用扩展时应该包含的sqlsrv部分

简单PDO调试测试:

$dsn = "mssql:host=localhost;dbname=THE_DB";
$user = "MY_UN";
$password = "MY_PW";                        
try {
    $dbh = new PDO($dsn, $user, $password);
    var_dump($dbh);
} catch (PDOException $e) {
    var_dump($e);
}
产生以下错误:

object(PDOException)#2 (8) {
  ["message":protected]=>
  string(21) "could not find driver"
  ["string":"Exception":private]=>
  string(0) ""
  ["code":protected]=>
  int(0)
  ["file":protected]=>
  string(35) "D:\Domains\TurboKits Admin\test.php"
  ["line":protected]=>
  int(13)
  ["trace":"Exception":private]=>
   array(1) {
    [0]=>
    array(6) {
      ["file"]=>
      string(35) "D:\Domains\TurboKits Admin\test.php"
      ["line"]=>
      int(13)
      ["function"]=>
      string(11) "__construct"
      ["class"]=>
      string(3) "PDO"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(3) {
       [0]=>
       string(44) "mssql:host=localhost;dbname=MY_DB"
        [1]=>
        string(10) "MY_UN"
        [2]=>
        string(10) "MY_PW"
      }
    }
 }
 ["previous":"Exception":private]=>
  NULL
  ["errorInfo"]=>
  NULL
 }

好的,等一下,我会更新问题的。错误日志中没有任何内容