此扩展需要 Microsoft ODBC Driver for SQL Server

问题描述 投票:0回答:0

我有windows sql server 2018,其他服务器centos7安装了CWPpro, 需要将centos连接到SQL SERVER DB

enter image description here

我曾经面对的过程 无法建立连接。 Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => 此扩展需要 Microsoft ODBC Driver for SQL Server . 访问以下 URL 以下载适用于 x64 的 SQL Server 的 ODBC 驱动程序:https://go.microsoft.com/fwlink/?LinkId=163712 [消息] => 此扩展需要适用于 SQL Server 的 Microsoft ODBC 驱动程序。访问以下 URL 以下载适用于 x64 的 SQL Server 的 ODBC 驱动程序:https://go.microsoft.com/fwlink/?LinkId=163712 ) )

这是 php 代码


$serverName = "DESKTOP-H640MFE15";  
$uid = "sa";     
$pwd = "password1";    
$databaseName = "db1";  
$connectionInfo = array("UID" => $uid, "PWD" => $pwd, "Database"=>$databaseName);  
$conn = sqlsrv_connect( $serverName, $connectionInfo);  
if( $conn )  
{  
     echo "Connection established.\n";  
}  
else  
{  
     echo "Connection could not be established.\n";  
     die( print_r( sqlsrv_errors(), true));  
}  
sqlsrv_close( $conn); 


some one help me ins

解决问题的方法

odbc driver
© www.soinside.com 2019 - 2024. All rights reserved.