I have a PHP script that I run locally (on my Windows XP Machine) that accesses a MSSQL server using the mssql_connect() function. I used xampp to get PHP on my machine.
Today I finished getting this to work on my second computer. The first time I did this, I also ran into a million problem – but didn’t note any of them. So here I am rectifying my previous mistakes in the hope of not having to search for the same solution next time.
The error I was getting was:
mssql_connect(): unable to connect to server: ‘www.ashtonsanders.com’
(Domain changed for security purposes.)
I handled it by replacing ntwdblib.dll with this ntwdblib.dll.zip in these two folders:
xampp/php
xampp/apache/bin
Enjoy!
-Ashton Sanders
(Note: algorytmy.pl was the final website that helped me handle my problem.)







Thank you sooooooooooooo much
Would never have guessed it!
Comment by Max — February 18, 2009 @ 1:09 pm
Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Comment by alvaro — August 12, 2009 @ 2:48 pm
Haha, You’re welcome.
Comment by Ashton Sanders — August 12, 2009 @ 2:54 pm
thank you so much, it’s great solution
Comment by azis — December 29, 2009 @ 2:02 am
Thanks man,you saved my time.
Comment by Sudhakar — October 11, 2010 @ 12:24 pm
This worked! Thanks.
Comment by mtashev — January 4, 2013 @ 4:50 am
I spent 2 days trying to fix this and along you come and BAAAMMMM!
Thanks 100%.
Comment by DuhkMahni — March 11, 2013 @ 11:43 am