The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HTTP_REFERER empty when referrer shown in DOM logs

Discussion in 'General Discussion' started by ttremain, Nov 4, 2014.

  1. ttremain

    ttremain Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    I do not know of any better place to post this, but since the server is built under cPanel, with
    Apache/PHP configured using EasyApache, I guess I'm posting here.

    I am not sure why, but many visitors I get, have a referrer shown in the DOM logs (/usr/local/apache/domlogs/domain.com) but upon their first visit, nothing shows up in PHP under $_SERVER['HTTP_REFERER']

    This is not always the case, but it is happening quite often.

    I am stumped.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    This is documented by PHP:

    PHP: $_SERVER - Manual

    Here is a snippet:

    Thank you.
     
  3. ttremain

    ttremain Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Yes, I know the variable is unreliable, but that is because it is browser dependent.

    In this case where the information IS passed to Apache by the browser, and IS in the domlogs,
    there is no reason it should not also be available in PHP.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can reproduce the issue and see what could be happening? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  5. ttremain

    ttremain Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    I'm not sure I can reproduce at will. It seems to be happening with a small % of visitors. I was just hoping someone had seen such a thing, and had any ideas for me. For the moment I will try to assume it's my own code causing the problem, until I can find a way to isolate it and/or generate some better logs of it happening.
     
Loading...

Share This Page