PHP-让MSSQL在Windows 10上运行


PHP - Getting MSSQL to work on Windows 10

我正在尝试通过Windows 10上的PHP连接到MSSQL服务器。但我遇到了一些主要问题,得到了以下错误:

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 ) )

我被要求安装用于SQL Server的Microsoft ODBC驱动程序11。但是这个驱动程序与Windows10不兼容。我已经安装了PHP 7和PHP 5的PHP驱动程序。如果没有适用于SQL Server的Microsoft ODBC Driver 11,两者都无法工作,但这与Windows 10不兼容。

有人找到绕过这个的办法了吗?我已尝试下载此:https://www.microsoft.com/en-US/download/details.aspx?id=36434

但它与Windows 10不兼容。

这不容易找到,但你需要支持最新的东西和Windows 10的版本是

MS ODBC驱动程序13

https://www.microsoft.com/en-us/download/details.aspx?id=50420