HTTP_REFERER empty when referrer shown in DOM logs
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.
-
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 -
]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 -
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 -
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.
Comments
4 comments