2008年2月1日星期五

PHP5 can't connect to SQL Server 2005 Database

Yesterday, I started my small PHP tool for traffic chart embeded in my AFC project. Although using PHP with MySql and Apache is very common, I had to use Php adapting to my AFC project environment that is under windows 2003 server R2 and SQL server 2005 standard.

I built the environment in minutes and made php run quickly. Things seemed go easy. But a strange problem got in my way that my program could not connect to the SQL server 2005 database. I checked everything to ensure no grammer error and made the source file as simple as just one line -- calling "mssql_connect" function.

I knew the reason till I read a post in http://cn.php.net/function.mssql-connect, it said "The ntwdblib.dll should be version 2000.80.194.0, and not version 2000.2.8.0 that PHP 5 ships with"

But I can't download that file from the website the author provided and it is difficult for me to find it over the internet. So I upload and share it from my box. Anyone needs can download it from:
http://www.box.net/shared/qfmoo1ask4
and override the one in your php5 folder.

没有评论: