Msg#: 3496887 posted 4:59 pm on Nov 5, 2007 (gmt 0)
This is driving me up the wall: why does PHP not want to connect to the local SQL Server? I've got some ASP.NET apps that connect to it fine, but with PHP, it just says it can't connect to the server. Is there anything I need to configure? It's PHP running off CGI on IIS on a Windows box with MSSQL Server Express 2005 installed.
Msg#: 3496887 posted 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.