|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24554 Lost anchor in header redirect
Submitted: 2003-07-08 22:49 UTC Modified: 2003-07-09 07:42 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: nisanov at bigpond dot net dot au Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.3.1 OS: Windows 2000
Private report: No CVE-ID: None
 [2003-07-08 22:49 UTC] nisanov at bigpond dot net dot au
I'm not sure if this is the same but that is talked about in Bug #6178: URI Re-writing failure but there is comments of this being fixed in php v4.0.2 and I am using php v4.3.1

I have a page that containts a form with enctype="multipart/form-data" - used to upload an image

The form data is sent to a 2nd page that writes the image data into a database.

In the 2nd page I also have a header function that contains an anchor reference (#MyAnchor);

When the header source page loads the anchor disappears from the url.

This only happens when I post from a form that has enctype=multipart/form-data.  I cannot be certain this is the cause but I have some suspicions that it is.

Any ideas?

Reproduce code:
header("Location: search.php?SID=".$_GET["SID"]."&msg=56&restore=true#UserDetails");

Expected result:
The url address in the browser to be:


Actual result:
The url address in the browser is:



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-09 07:42 UTC]
This can't be any PHP bug. And RTFM:
"Note: HTTP/1.1 requires an absolute URI as argument to 
Location: including the scheme, hostname and absolute path.."

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Dec 05 08:05:54 2022 UTC