Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Undefined Index accessiong $_SERVER["HTTP_REFERER"]

    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

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,106
    Thanks
    11
    Thanked 101 Times in 99 Posts
    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'])
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    piz
    piz is offline
    Regular Coder
    Join Date
    Jul 2002
    Location
    Barcelona
    Posts
    246
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, the link you posted works fine.

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

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #5
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Code:
    Undefined index: HTTP_REFERER
    Hmmmm.
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •