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文档。

转载于:https://www.cnblogs.com/martin1009/archive/2012/03/26/2417357.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值