php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31340 Notice: Undefined variable: HTTP_REFERER
Submitted: 2004-12-30 00:23 UTC Modified: 2004-12-30 01:37 UTC
From: jfishersmith at dialectsolutions dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.3.10 OS: Windows 2000, NT
Private report: No CVE-ID: None
 [2004-12-30 00:23 UTC] jfishersmith at dialectsolutions dot com
Description:
------------
Since I installed PHP 4.3.10 and 5.0.3 the HTTP_REFERER produces the following error "Notice: Undefined variable: HTTP_REFERER in c:\inetpub\wwwroot\PHP\PHP_2party.php on line 444"

The same code has worked successfully in previous versions of PHP.

Is this something that should work still or has it been deprecated?



Reproduce code:
---------------
<?
$againLink  = $HTTP_REFERER;
?>
<p><a href='<?=$againLink?>'>Another Transaction</a></p>


Expected result:
----------------
The code should create a hyperlink back to the previous page. It is done in this manner as different HTML pages call this one transaction page.

Actual result:
--------------
The error indicated above is written to the screen and the hyperlink is not complete. For example the incomplete hyperlink is shown as: http://localhost/PHP/ instead of: http://localhost/PHP/PHP_2party_Order.html This means the browser does not return to the original location when the hperlink is clicked.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-30 01:37 UTC] sniper@php.net
In PHP 4.2.0, the 'register_globals' setting default changed to
'off'. See http://www.php.net/release_4_2_0.php for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC