2016-07-13 192 views
0

我有一個WAMPSERVER 2.5開發服務器。它運行PHP 5.512。從WAMPSERVER 2.5連接到SQL服務器上的數據庫

我試圖連接到我們的實時SQL Server。我已經安裝並激活了版本32 files,並用下面的代碼:

<?php 

$link = sqlsrv_connect('obscured_ip:obscured_port', array('Database'=>'obscured_database','UID'=>'obscured_uid', 'PWD'=>'obscured pwd')); 

if (!$link) 
    die(print_r(sqlsrv_errors(), true)); 

?> 

,我發現了以下錯誤:

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

指定那裏link只是把我帶回到司機下載頁面。我究竟做錯了什麼?

+1

您是否安裝了[用於SQL Server的Microsoft ODBC驅動程序11](https://www.microsoft.com/en-us/download/details.aspx?id=36434) – RiggsFolly

+0

@RiggsFolly - 我沒有 - 錯誤信息中提供的URL是錯誤的,這將我扔掉了。 – BFWebAdmin

回答

相關問題