Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$_SERVER vars compatibility

Status
Not open for further replies.

DeepBlerg

Technical User
Jan 13, 2001
224
AU
Hi,

I have noticed in instances that the $_SERVER element "HTTP_REFERER" is sometimes not available (I think) on Windows 98 machines. And I know it isn't present when you load a page first; I'm talking about when people are navigating through the site clikcing links to new pages, so it should be available as I can see it is present in the $_SERVER vars that I output on my Win XP machine.

Does anyone know of issues that can affect the $_SERVER vars depending on OS version / browser version?

Thanks in advance.
 
Your brand of web server will have more to do with the problem of missing $_SERVER elements than anything.

The PHP online manual states:
You may or may not find any of the following elements in $_SERVER. Note that few, if any, of these will be available (or indeed have any meaning) if running PHP on the command line.

Most of the things in $_SERVER are handed to PHP by the web server when a PHP web script is invoked. Some things will be there most of the time, as they are part of the CGI 1.1 specification. Others are web-server-specific -- for example, $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'] and $_SERVER['AUTH_TYPE'] are only available when running PHP with Apache, and then only when running PHP as an Apache module.




Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Some firewalls strip out info headers like ip adresses, referer etc
 
Also, some clients give you the option to turn off the REFERER so it isn't passed along to your website.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top