SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SERVER variable inaccuracy

    I'm having issues with PHP's predefined SERVER variables.

    I have the following alias set up in my httpd.conf:

    Alias /sharedstuff/ "path-to-shared-stuff-directory-on-domain-1"

    Theoretically, when a script in domain2 uses the /sharedstuff/ path, it should use the file from domain1.

    This basically works. However, when domain2 calls /sharedstuff/test.php, and test.php outputs the HTTP_HOST variable - it says domain1.

    I find this especially odd, as I have the same set up on my development and productions servers. On development, HTTP_HOST says domain2 (which is what I want). But on the production server, it returns domain1 (NOT what I want).

    Could I be missing some setting... or what?

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No-one has ever come across this...?

  3. #3
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I really don't know, but what varies? php version? webserver version? php installed as apache module vs cgi? Is the request being made via http 1.1 or 1.0?


Bookmarks

Posting Permissions

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