|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-08-20 05:03 UTC] php at lansco dot de
Description: ------------ Sometimes $HTTP_HOST is empty while $_SERVER["HTTP_HOST"] contains the expected value. After a reload $HTTP_HOST mostly contains the expected value. This error also occurs with PHP-4.3.2 Reproduce code: --------------- print "1: ".$HTTP_HOST."\n"; print "2: ".$_SERVER["HTTP_HOST"]."\n"; Expected result: ---------------- 1: test.com 2: test.com Actual result: -------------- 1: 2: test.com PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 06:00:02 2025 UTC |
One more thing: Where do you set "register_globals" ? (php.ini and/or httpd.conf and/or .htaccess ?) And can you try with this script instead: <?php error_reporting(E_ALL); echo '<pre>'; var_dump($HTTP_HOST); var_dump($_SERVER['HTTP_HOST']); echo '</pre>'; ?> I can not reproduce this..I've created a Directory with a few interesting files: http://www.lansco.de/php/ Please try http://www.lansco.de/php/bug-25172.php as often as necessary to reproduce the error. "register_globals" is only set in the php.ini