[英]PHP MsSQL WAMP - Couldn't connect to MSSQL
我已經從PHP的官方MSSQL驅動程序中下載了 SQLSRV32.EXE,並將php_sqlsrv_56_ts.dll和php_pdo_sqlsrv_56_ts.dll提取到了C:\\wamp\\bin\\php\\php5.6.19\\ext
在WAMP菜單的php.ini中添加了以下聲明。
extension=php_pdo_sqlsrv_56_ts.dll
extension=php_sqlsrv_56_ts.dll
然后,我從參考頁運行示例代碼。
由於以下錯誤,我無法連接到MS SQL Server
Connection could not be establish
Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) [1] => Array ( [0] => IM002 [SQLSTATE] => IM002 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) )
我嘗試下載ODBC驅動程序13(適用於Windows 10),但無法正常工作。 有人可以告訴我我在做什么錯嗎?
如我所見-ODBC驅動程序13在您的系統上不受支持,所需的一個是ODBC Driver 11。
https://www.microsoft.com/zh-cn/download/details.aspx?id=36434
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.