天天看點

xampp+php+mysql.dll_windows下xampp環境php無法通路mssql

If the mssql extension was loaded in the php.ini, sometimes it comes to access problems when only TCP/IP is used. You can fix that problem with a newer "ntwdblib.dll" from Microsoft. Please replace the older file in "\xampp\apache\bin" and "\xampp\php" with the new one. Because of the license, we can't package a newer version of this file with XAMPP.

這個是xampp官網的原文

意思是由于license許可的原因,沒有把新版的ntwdblib.dll放到\xampp\apache\bin目錄下

ntwdblib.dll檔案可以在mssql的安裝盤中找到

對于php5.3以後的版本,需要下載下傳SQL SERVER Driver for php ,是一個自解壓的EXE檔案,解壓後得到

php_sqlsrv_53_nts_vc6.dll等等一些檔案,還有一個chm格式的說明

把他們放到PHP的ext目錄下,然後在php.ini中加入

extension=php_sqlsrv_53_nts_vc6.dll

重新開機APACHE或IIS就可以了

如果不行,就換一個dll,直到好使

mssql_connect等函數不能用了,需要看微軟給的那個chm文檔。