Hi all I would apreciate some generic help with the following problem as it's probably far too complex to document and solve on a forum but I need some more ideas on how to diagnose this problem.

PHP running on a Hiawatha server using an mssql 2000 database.

all of my queries run through a php object that runs queries and then builds the data into arrays that are later processed into tables to be displayed on a web page.

all of my queries run correctly apart from one that causes a HTTP 500 error to be displayed in a web browser. the error occurs at the point of execution of the query, I have echoed the query, copied the query string and pasted it directly into sql server management studio and the expected result is returned.

does anyone have any ideas what could cause a query to not run within the php environment when it can be demonstrated that the query is perfectly valid by running it in management studio?

thanks in advance for any help anyone can offer.


8 Years
Discussion Span
Last Post by codejoust

Check all the error logs.
A 500 error occurs when the server is overloaded, or when there is a problem in your script.
You should also try to turn error reporting on in your php file (using ini_set or equiv.)
Typically, php doesn't throw a 500, so check apache's or iss's error logs (I don't know too much about iss, but I do know about apache...)
If you find something there that you can't understand, try posting it here.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.