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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu Apr 18 19:01:30 2024 UTC