| 7:56 pm on Nov 5, 2007 (gmt 0)|
Make sure Named Pipes and TCP/IP connections are enabled on SQL server 2005--this is the most common reason for connection failure, as both are disabled by default on a fresh install.
| 10:04 pm on Nov 5, 2007 (gmt 0)|
Yep they're on!
| 10:22 pm on Nov 5, 2007 (gmt 0)|
In that case, are you sure that the PHP MSSQL extension was installed?
Also make sure that you're connecting to "localhost/SQLEXPRESS" (or whatever your SQL server instance name is). Connecting directly to localhost probably won't work for a SQL Express installation unless you changed a few defaults.
If all this fails, try replacing ntwdblib.dll in your PHP folder with an older version (there's a known issue with the current version distributed with the Windows PHP installation), then restart IIS for good measure.
| 10:48 pm on Nov 5, 2007 (gmt 0)|
Where do I get this older version from?
| 3:55 am on Nov 6, 2007 (gmt 0)|
I don't have a link off-hand--I remember finding it in the user comments for the documentation of the mssql_connect() function on php.net.
| 8:18 pm on Nov 6, 2007 (gmt 0)|
I just got this link in a MSDN Flash e-mail:
Microsoft SQL Server 2000/2005 Driver [microsoft.com]
| 8:03 pm on Nov 8, 2007 (gmt 0)|
Yeah I've seen that, but I don't know whether to install it.