laravel 此扩展需要 Microsoft ODBC Driver 13 for SQL Server 才能与 SQL Server 通信
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43845373/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
This extension requires the Microsoft ODBC Driver 13 for SQL Server to communicate with SQL Server
提问by Murat Kaya
I'm trying to connect mssql database with php 7 and ubuntu 16.04. I installed odbc driver and check it with sample_c_linux file its working but when I'm executing my code its giving this error.
我正在尝试使用 php 7 和 ubuntu 16.04 连接 mssql 数据库。我安装了 odbc 驱动程序并使用 sample_c_linux 文件检查它的工作,但是当我执行我的代码时,它给出了这个错误。
[PDOException] SQLSTATE[IMSSP]: This extension requires the Microsoft ODBC Driver 13 for SQL Server to communicate with SQL Server. Access the following URL to download the ODBC Driver 13 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712
[PDOException] SQLSTATE[IMSSP]:此扩展需要 Microsoft ODBC Driver 13 for SQL Server 才能与 SQL Server 通信。访问以下 URL 以下载适用于 x86 的 SQL Server 的 ODBC 驱动程序 13:http: //go.microsoft.com/fwlink/?LinkId=163712
$db = DB::connection('sqlsrv');
$sql = "sp_EntityFullList";
$procedure = $db->getPdo()->exec( $sql );
回答by Sadee
Still you need to install ODBC 11 driver.
您仍然需要安装 ODBC 11 驱动程序。
Ref: https://www.microsoft.com/en-us/download/details.aspx?id=36434
参考:https: //www.microsoft.com/en-us/download/details.aspx?id =36434