Hello,
I have a collection of php scripts that act as a site management tool. In my testing environment (php 4.0.4/NT4), it worked fine. When I put it on a client's server (php 4.0.4/Win2k), I started getting the dreaded Access Violation errors. So, I switched them from running ISAPI to cgi. It took me awhile to sort out all the cookie issues, but I did.
I have one lingering problem that I can't figure out for the life of me. I have an SQL query (MSSQL7) that is embedded in a function. (As happens throughout the scripts.) When the function is called, if a certain variable is set, the function does a simple query on one table in the database (no joins, no tricky WHERE clauses). If it doesn't find a result, the script continues on. If it does find a result, a warning error is supposed to be displayed and the script exits. If the variable isn't set, the function redirects you to a new page.
The function works fine when the variable isn't set. If, however, it needs to do the query, it just hangs the whole server - the page never resolves. I tried opening up the MS Query Analyzer and running the query - I got a quick response. So, I don't think there's anything wrong with the sql syntax.
This also happens when I do an insert on the same table and then attempt to redirect to another page. The server hangs and hangs...but the data is inserted.
As soon as I switch the test environment back to ISAPI, everything works just fine.
Any ideas?