#73: Error connecting PHP to Microsoft SQL-Server
I’m a PHP user. I use PHP to do some task in my daily job. Two days ago, I need to connect to microsoft SQL server using PHP. It is quite easy, because PHP has many standard mssql_xxx() function just like any other db connecting stuff.
The problem is : I can connect to the same server from one PC, but can not do it, even with the very same PHP version and configuration from some others (located in the different network segment). I got this error : "mssql_connect(): Unable to connect to server: ..."
Googling, and I found, it is probably caused by protocol used by mssql_connect() (which is netbios instead of tcp). I then check the sql server configuration, but the TCP is already enabled. Then, after some more googling, I found this link : http://bugs.php.net/bug.php?id=40034 …
That is a bug … some version of PHP ntwdblib.dll use netbios instead of TCP as a default protocol. If our network router is not allowing netbios connection cross the segment, then it will give us a problem.
Finally, this is the working solution (at least for me) : download the “TCP” version of ntwdblib.dll from this site : http://www.dlldll.com/ntwdblib.dll_download.html … It works for my situation, and hope it is also good for all of you with the similar problem …
Good luck,
Have you ever stuck in this problem? You are 100% sure about your username and password, but still, your Blackberry keep telling this annoying error messages “Invalid Yahoo! ID or Password” … even if we are able to logged in using that combination using a computer in that time.
As a programmer, usually, my application is not a commercial ones. I build them, because I love to do a programming, so I just share with the communities as a freeware. But sometimes, for any reason, we have to create a commercial application. Today, I believe, Java is the most language which is used in the mobile programming. Personally, I have a “bad” experience with Java mobile programming. It was 2005, and I got a conclution that Java is very slow, and it was not good for building an application. But, today, I change my mind. I got a very good impression after building myQuran.

Rubik’s Cube is an old puzzle game. It is invented in 1974, and then sold in the toy shop since 1980 (