繁体   English   中英

PHP MsSQL WAMP-无法连接到MSSQL

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM