|  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
 [2003-08-20 04:54 UTC] php at lansco dot de
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:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-20 04:56 UTC]
$SERVER doesn't even exist... so how the h**k can that work?
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Oct 02 22:01:25 2023 UTC