how to use mssql_* function in php on windows platform

The following steps enabled MSSQL 2005 support on Windows XP.
(native drivers, not odbc which works out-of-the-box)

1) Place ntwdblib.dll in C:\Windows\System32

2) Place php_mssql.dll in C:\Windows\System32

3) uncomment php_mssql.dll in php.ini

4) Changed my default SQLSERVER 2005 install so it accepts named piped.
(Do this via start-> SQLServer2005->configuration tools->SQL SERVER surface area configuration.

5) reboot.


tested on:

Microsoft SQL Server 2005 and Windows XP With PHP 5.2.3.

Microsoft SQL Server 2000 should work too.

you can download ntwdblib.dll here .

after download please RENAME that file from ntwdblib.dll.jpg to ntwdblib.dll .

I have to rename that file in order to upload it to this wordpress ^_^

Microsoft do offer a SQL Server 2005 driver for PHP at

It can be download free of charge. Binaries are provided for Windows platform only.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s