php mssql connection - Intermittently Connects???

We have created some very simple php pages to see if the code can retrieve data from our SQL Server, and they do successfully query the database and return data, BUT, only about 2 out of 10 times on a browser refresh. The rest of the times we get a “Unable to connect to server: localhost,1433” error.

This, of course, has us very confused. I’d almost rather not be able to connect at all as it would make more sense.

If you are able to provide any insight into what might be happening with our setup, it would be MUCH appreciated. We are running MSSQL 8.00.818, PHP Version 5.2.5, and IIS 6.

Thanks in advance.

The only thing I could possibly think of, is that connections aren’t closed properly, but that’s just a wild shot. We’re gonna need more information on this. I presume you’ve tried google?


mssql_pconnect vs. mssql_connect

The “pconnect” works while just the “connect” doesn’t.

While I’d love to know the “why” of it, I am ecstatic for now that things seem to be working.

Sponsor our Newsletter | Privacy Policy | Terms of Service