Skip to main content

HTTP_REFERER empty when referrer shown in DOM logs

Comments

4 comments

  • cPanelMichael
    Hello :) This is documented by PHP: [url=http://php.net/manual/en/reserved.variables.server.php]PHP: $_SERVER - Manual Here is a snippet: 'HTTP_REFERER' The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
    Thank you.
    0
  • ttremain
    ]Hello :) This is documented by PHP: [url=http://php.net/manual/en/reserved.variables.server.php]PHP: $_SERVER - Manual Thank you.

    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.
    0
  • cPanelMichael
    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.
    0
  • ttremain
    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.
    0

Please sign in to leave a comment.