Click to See Complete Forum and Search --> : error?


donnierivera
08-29-2002, 04:22 PM
I have posted this in two other place with no luck... Just don't know really where it belongs but here goes....

Ok… I used someone else development box, which has an older version of apache and php. My box gives me a Dr. Watson error that states a memory over load error and says that an error will be in my error.log file, but it is blank. However the other box gave a different error and put this in the error.log file: Premature end of script headers: d:/php/php.exe

I have made a little more progress in determining the problem, but it is still not solved. The line of code that is making the application error out is my connection to the Database in the application page… not the login (which is where I originally thought the problem was happening). The way the application works is if someone access a page that has security, it checks for a session and permission to that page. If this fails, it stores the location in a session variable then redirects them to a login page. My log in page does two checks. 1) It uses the database/OS to see if the user has permission to the database 2) It also quires the DB to see if the user has permissions to that application. After they pass these two checks, I redirect them to the page that sent them to the logon page (This is what I thought was the problem, but it is not). The problem occurs when I try to make a connection to the database in the application. I have checked 1) Mad sure all conection were closed before establishing a new one 2) Variables having correct values and not extra charters that are not supposed to be there 3) I have hard coded my connection… Nothing seems to work and leave me wondering if there is something wrong with one of the php library files. Mainly because of this error in the apache error.log file (Premature end of script headers: d:/php/php.exe) Does anyone have any clue to what might be causing this problem? Thanks for any input… ow- my DB is Informix… And all my configuration is correct because I have created other applications, but I have never see this problem before…

donnierivera
08-29-2002, 06:29 PM
Finally… Found the bug, FYI: The problem was in my abstracted db file. I added a logical statement to see if all parameters were passed in or to use the default values for the connection (i.e. I haven’t made changes to this file in A LONG TIME). Problem was I cut and pasted my db_connect (That is what I get for being lazy) and didn’t change it to ifx_connect (what should have been the real connection call), but I wish I would have gotten a better error…. When I got the memory error, I was confused because I wasn’t doing anything with arrays so I thought there was something wrong with apache (especially when the older box gave me a different error), but forgot about the recursion factor in a function…. I guess I should have put all my code in the post, but that would have given someone a sore eye…