...

View Full Version : Undefined Index accessiong $_SERVER["HTTP_REFERER"]



Exodious
01-11-2004, 01:43 PM
Hi, on my local machine, I can access the $_SERVER["HTTP_REFERER"] variable, but doesn't work our shared server.

I keep getting "Notice: Undefined index: HTTP_REFERER in filename"


http://www.teammadcow.co.uk/chrismalc/index.php

Any ideas?

Thx

firepages
01-11-2004, 02:08 PM
what browser & what version of PHP on the server?

some browsers do not pass the referer , but if it works on one then should work on t'other? unless your live server is really old and does not understand $_SERVER (try $HTTP_SERVER_VARS['HTTP_REFERER'])

piz
01-11-2004, 02:08 PM
Well, the link you posted works fine.

Are there different PHP Versions on the shared server an don your local machine?

Exodious
01-11-2004, 03:00 PM
Well, the local machines php version is 4.2.3 and the shared server is 4.3.3 - the browser I'm testing on is IE 6.02 but would expect NS6 and mozilla to be used by others

The old method $HTTP_SERVER_VARS['HTTP_REFERER'] results in invalid variable

SDP2006
01-11-2004, 06:22 PM
I have had this problem on my server too.

On my websites server, which is not on my local machine, $_SERVER['HTTP_REFFERER']; works fine but on my local machine running apache and php4 I get the same error
Undefined index: HTTP_REFERER Hmmmm.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum