php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25171 $HTTP_HOST and $SERVER["HTTP_HOST"] not always the same
Submitted: 2003-08-20 04:54 UTC Modified: 2003-08-20 04:56 UTC
From: php at lansco dot de Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.3.3RC4 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at lansco dot de
New email:
PHP Version: OS:

 

 [2003-08-20 04:54 UTC] php at lansco dot de
Description:
------------
When register_globals=on is set the values of $HTTP_HOST and $SERVER["HTTP_HOST"] conatin not always the same.

Sometimes $HTTP_HOST is empty while $SERVER["HTTP_HOST"] contains the expected value.

After a reload it mostly works again. I cannot reproduce the error.

This error also occurs with PHP-4.3.2

Reproduce code:
---------------
print $HTTP_HOST."\n";
print $SERVER["HTTP_HOST"]."\n";

Expected result:
----------------
www.lansco.de
www.lansco.de


Actual result:
--------------
www.lansco.de


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-20 04:56 UTC] derick@php.net
$SERVER doesn't even exist... so how the h**k can that work?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC