php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23050 Header Location error
Submitted: 2003-04-04 07:15 UTC Modified: 2003-04-08 02:11 UTC
From: tomas dot marklund at datortek dot orebro dot se Assigned:
Status: Closed Package: IIS related
PHP Version: 4.3.1 OS: WinXP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tomas dot marklund at datortek dot orebro dot se
New email:
PHP Version: OS:

 

 [2003-04-04 07:15 UTC] tomas dot marklund at datortek dot orebro dot se
I installed a new php4.3.1 on a new IIS5 on a new computer with WinXP SP1.
And then all my scripts with the 
Header("location:index.php") funktion stopt working.

The only error message that i get is:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

Note: It worked before!!
I hope this is no bug! but a error i've made

PHP 4.3.1 installer.zip
MySQL 4.0 (if this matter)


code--

<?$connect = mysql_connect("localhost","secr","secr");
mysql_select_db("daniel" , $connect);
@$result = mysql_query("insert into studier(ar, skola) values(\"$ar\",\"$skola\")", $connect);
header("Location:index.php");?>

--code

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-04 11:09 UTC] sniper@php.net
header("Location:foo.php"); violates the RFC. Not bug in PHP.

 [2003-04-04 12:37 UTC] tomas dot marklund at datortek dot orebro dot se
Ok how to make it work then???
 [2003-04-04 12:45 UTC] jay@php.net
Use the full, absolute URI. 
 
header("Location: http://www.example.com/foo.php"); 
 
The RFC: 
 
http://www.w3.org/Protocols/rfc2616/rfc2616.html 
 
J 
 [2003-04-05 06:35 UTC] tomas dot marklund at datortek dot orebro dot se
I thought i've tried that??! I'll try it again!

Thanks!
 [2003-04-07 01:44 UTC] tomas dot marklund at datortek dot orebro dot se
Now i've tried And it still doesen't work:
header("Location:http://tomas/daniel/index.php");

tomas is the domain. I still get this:

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

It must be a bug!
 [2003-04-07 02:24 UTC] tomas dot marklund at datortek dot orebro dot se
This is now reopened!!!!!
 [2003-04-07 04:48 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

It's not any PHP bug.

 [2003-04-07 05:06 UTC] mgf@php.net
And, by the way, that was still not a valid Location header -- it has to be:

   header("Location: http://tomas/daniel/index.php");

with the space after Location:, as shown in Jay's example.
 [2003-04-07 06:02 UTC] tomas dot marklund at datortek dot orebro dot se
header("Location: http://tomas/daniel/index.php");

Still doesen't work!!
 [2003-04-07 06:06 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Try the snapshot..if it still doesn't work, check your settings..this really isn't any bug in PHP. Trust us in that.

 [2003-04-08 02:11 UTC] tomas dot marklund at datortek dot orebro dot se
YES!! IT'S WORKING 

It looks like a bug in IIS!
Thanx for all help!!!
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC