Hi Peter Comments inline... On 15 May,2003 at 13:19 Peter Misun wrote: > > running PHP4.1.3 on IIS 5 and everything work's fine > > I have only problem with using header() function > problem is, after submiting form in first.php: > echo "<form name=form_abc method=post action=second.php>\n"; > and having in second.php: > header('location:third.php'); > > it produces error in browser like this: > CGI Error > The specified CGI application misbehaved by not returning a complete set of > HTTP headers. The headers it did return are: I have only ever seen this error when the page I was trying to refer to didn't exist or wasn't accessible by IIS. Also, I've always done headers like this header('Location: third.php'); or header('Location: http://www.mydomain.com/third.php'); The location header is supposed to have the full URL, I believe, but it doesn't have to. Don't know if that will help at all ? The formatting is fussy but then, the location header seems fussy in many browsers. > > what headers?!? > after reloading/refreshing page by user, everything is ok > > in logfiles of IIS I found out, that > first.php has protocol code 200 > second.php has protocol code 302 > third.php has protocol code 502 (what leads to that error) 502 is the Bad Gateway response code (can't reach the page because of a network problem). I think that IIS is not returning the correct code here, though, or is returning the best it can for the situation. 502 seems to be a bit of a dustbin for errors sometimes !!! > third.php after refreshing/reloading has protocol code 200 > > please, help > > 5o > Hope this helps .... :-) Ronan e: ronan@thelittledot.com t: 01903 739 997 w: www.thelittledot.com The Little Dot is a partnership of Ronan Chilvers and Giles Webberley -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php