php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30019 $_SERVER['HTTP_REFERER']; doesn't always display
Submitted: 2004-09-08 00:27 UTC Modified: 2004-09-09 20:22 UTC
From: asfsm at uaa dot alaska dot edu Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.0.1 OS: Windows 2003 (standard)
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: asfsm at uaa dot alaska dot edu
New email:
PHP Version: OS:

 

 [2004-09-08 00:27 UTC] asfsm at uaa dot alaska dot edu
Description:
------------
$_SERVER['HTTP_REFERER']; doesn't always display

It displays occassionally, but not all the time.

Reproduce code:
---------------
<?php
$send_ip = $_SERVER['REMOTE_ADDR']; 
$send_agent = $_SERVER['HTTP_USER_AGENT'];
$send_refer = $_SERVER['HTTP_REFERER'];
?>

<table border="0">
<tr>
 <td><?php echo $send_ip; ?></td>
</tr>
<tr>
 <td><?php echo $send_agent; ?></td>
</tr>
<tr>
 <td><?php echo $send_refer; ?></td>
</tr>
</table>

Expected result:
----------------
<browser's_IP address>
<referring page>
<browser type>

Actual result:
--------------
<browser's_IP address>

<browser type>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-08 06:04 UTC] rasmus@php.net
Because clients don't always send the referrer.  No bug here.  PHP will have it if the client provides it, otherwise it won't.
 [2004-09-08 20:59 UTC] asfsm at uaa dot alaska dot edu
Even if the cache is cleared and the page is reloaded?  this is a browser issue?
 [2004-09-09 09:01 UTC] rasmus@php.net
Especially if the cache is cleared and the page reloaded.  Do you understand what the referrer actually means?  It is the URL that a user clicked on a link to get to your page.  If the user simply types in the url or does a reload, there will be no referrer in the request.  This isn't a browser "issue", this is simply how the Web works.
 [2004-09-09 20:22 UTC] asfsm at uaa dot alaska dot edu
Yes I understand how the web works, but I don't obviously know everything. Your explanation of referer makes sense though.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 11 17:02:22 2024 UTC