$_SERVER['HTTP_HOST'] weird browser problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • op12

    #1

    $_SERVER['HTTP_HOST'] weird browser problem

    Somehow when I am using $_SERVER['HTTP_HOST'] to determine which
    subdomain I am on, it works fine in Firefox and not in IE. Doing some
    debugging, I found that the string returned was empty for IE, but had
    the expected subdomain in Firefox.

    I found the same to be true for $_SERVER['SERVER_NAME']

    Any idea on how to resolve the issue? I thought that the PHP would be
    browser independent since it is processed server-side, but it seems
    like IE is not passing headers?

  • Luke - eat.lemons@gmail.com

    #2
    Re: $_SERVER['HTTP_HOST'] weird browser problem

    op12 wrote:
    Somehow when I am using $_SERVER['HTTP_HOST'] to determine which
    subdomain I am on, it works fine in Firefox and not in IE. Doing some
    debugging, I found that the string returned was empty for IE, but had
    the expected subdomain in Firefox.
    >
    I found the same to be true for $_SERVER['SERVER_NAME']
    >
    Any idea on how to resolve the issue? I thought that the PHP would be
    browser independent since it is processed server-side, but it seems
    like IE is not passing headers?
    >
    Just to let you know ive had the same problem, cant seem to find a
    reason why. Can anyone shed any light on this?

    Luke.

    Comment

    • Alvaro G. Vicario

      #3
      Re: $_SERVER['HTTP_HOST'] weird browser problem

      *** op12 escribió/wrote (31 Aug 2006 22:28:05 -0700):
      Somehow when I am using $_SERVER['HTTP_HOST'] to determine which
      subdomain I am on, it works fine in Firefox and not in IE. Doing some
      debugging, I found that the string returned was empty for IE, but had
      the expected subdomain in Firefox.
      >
      I found the same to be true for $_SERVER['SERVER_NAME']
      Have you enabled display_errors and set error_reporting to E_ALL? Are you
      using sessions, cookies or JavaScript?


      --
      -+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
      ++ Mi sitio sobre programación web: http://bits.demogracia.com
      +- Mi web de humor con rayos UVA: http://www.demogracia.com
      --

      Comment

      Working...