#27041 [NEW]: Cannot set referer in header function

From: Date: Mon, 26 Jan 2004 00:42:59 +0000
Subject: #27041 [NEW]: Cannot set referer in header function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-53881@lists.php.net to get a copy of this message
From: it_chan at hotmail dot com Operating system: windows xp/redhat 7.3 PHP version: 4.3.4 PHP Bug Type: HTTP related Bug description: Cannot set referer in header function Description: ------------ A web page (a.php) has a link to (b.php), when the link is clicked I want to http referer in b.php to show that referer is some other x.php as if the link was on x.php. Reproduce code: --------------- # a.php <?php header('Referer: http://localhost.com/x.php', true); ?> <a href="/b.php"> check </a> #b.php <?php echo "referrer = " . $_SERVER['HTTP_REFERER']; ?> Expected result: ---------------- referrer = http://localhost/x.php Actual result: -------------- referrer = http://localhost/a.php -- Edit bug report at http://bugs.php.net/?id=27041&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27041&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27041&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27041&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27041&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27041&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27041&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27041&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27041&r=support Expected behavior: http://bugs.php.net/fix.php?id=27041&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27041&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27041&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27041&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27041&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27041&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27041&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27041&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27041&r=float

« previous php.bugs (#53881) next »