Website Designers and Webmasters

Dedicated to all the tasks Webmasters, Website Developers and Website Designers find themselves facing.

mssql_connect(): unable to connect to server:

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.)

Tags: , , ,

7 Comments »

  1. Thank you sooooooooooooo much

    Would never have guessed it!

    Comment by Max — February 18, 2009 @ 1:09 pm

  2. Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Comment by alvaro — August 12, 2009 @ 2:48 pm

  3. Haha, You’re welcome.

    Comment by Ashton Sanders — August 12, 2009 @ 2:54 pm

  4. thank you so much, it’s great solution

    Comment by azis — December 29, 2009 @ 2:02 am

  5. Thanks man,you saved my time.

    Comment by Sudhakar — October 11, 2010 @ 12:24 pm

  6. This worked! Thanks.

    Comment by mtashev — January 4, 2013 @ 4:50 am

  7. 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

RSS feed for comments on this post. TrackBack URL

Leave a comment