Re: Header function on IIS vs. Apache

From: Date: Wed, 10 Jan 2001 08:44:49 +0000
Subject: Re: Header function on IIS vs. Apache
Groups: php.windows 
Request: Send a blank email to php-windows+get-4899@lists.php.net to get a copy of this message
>I am tweaking a PHP web app developed on Apache/Linux/PHP3 to work on >IIS/Win2k/PHP4. I have encountered an unusual situation with the header() >function in PHP. When a user submits a form, depending on the results they >are redirected to a certain URL using the Header function (usually something >like /folder/TheFile.php3?this=that). This works on the Apache/Linux/PHP3 >setup but not on the latter - it generates one of those unhelpful 502 CGI >Errors (The specified CGI application misbehaved by not returning a complete >set of HTTP headers. The headers it did return are:). In some cases just >refreshing the page will cause it to load properly; in other cases, not. The error you are getting occurs most often when the php file does not exist. Maybe there is sometimes an error in the url in the header you output? Two ways of debugging for this I can thing of are: Instead of sending out a header, output a page with a link on it so you can read the URL. Configure IIS to 'check file exists' for the .php extension (or whatever extension you are using). If the error changes to a 404, then the script does not exist. If the error stays the same, then the script is not outputting anything at all for some reason. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org

« previous php.windows (#4899) next »