Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP MSSQL - OK on W2K, but not 2003 server

Status
Not open for further replies.

menkes

Programmer
Nov 18, 2002
47
0
0
US
We run a site using PHP 4.3.9. It has successfully run for years using 3 database servers. All of the servers are W2K running SQL Server 2000 SP3 or SP4.

In expanding our site, we now need to connect to 3 additional database servers. All of these servers run SQL Server 2000 SP4 on Windows 2003 server.

Using the exact same coding, we have been unable to connect to any of the Windows 2003 databases. I cannot find the reason.

I have tried:
- Using our standard abstraction layer, as well as PHP mssql functions

- Checking that TCP\IP is enabled on db servers

- Made sure db servers registered as servername (rather than localhost)

- Using both IP address (our standard) and fully qualified server name

- Upgrading ntwdblib.dll in all locations

- Adding the IUSR account to the db server

The only error I get is that it is unable to connect. That's it, nothing else.

Please post any ideas you have as I am just stuck at this point. I have scoured the web looking for any difference between what we have been accessing (on W2K servers) and what we are trying access (Windows 2003 servers).

Help!
 
Have you checked the firewall settings on your W2K3 boxes?

You might also try doing a port-scan of the server to see what ports are open. That way you could verify that MSSQL is available.



Want the best answers? Ask the best questions! TANSTAAFL!
 
and is the mssql server configured to use tcp/ip AND named pipes? from recollection, only the latter is enabled by default (but admittedly this was for a later version of sql server).

 
on your 2k3 box, Go to Administrative Tools -> Local Security Policy.

Expand Local Polices
Expand Security Policies
Find the policy named "Network Access: Let Everyone permissions apply to anonymous users"
Double Click that policy and set it to enabled.

This fixed my issue last week!
 
really?? i honestly can't see why you would want to do that unless you were somehow accessing the database with the credentials of the incoming user rather than a DSN or some other hard coded credentials within the script.

still, always worth a try provided the OP understands the (large) security ramifications of exposing the Everyone account to anonymous access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top