#25172 [Fbk->Opn]: register_globals=on and $HTTP_HOST sometimes empty
ID: 25172 User updated by: php at lansco dot de Reported By: php at lansco dot de -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: Linux PHP Version: 4.3.3 New Comment: I've found one (among thousands) .htaccess-File that contains "php_flag register_globals off". When I access the site that has this entry simultaneous with my test page the error occurs. Elsewise not. After I have disabled the .htaccess-entry the error doesn't occur any more. I have tested again various versions of PHP while accessing the site with .htaccess-entry: PHP-4.3.1: no errors PHP-4.3.2: errors PHP-4.3.3: errors Why does it properly work with PHP-4.3.1 and not with later versions? Previous Comments: [2003-08-25 22:24:08] [EMAIL PROTECTED] Yes, it took about 30 minutes until I got the same result. This is what I found: register_globals Off On Something caused this..are you ABSOLUTELY sure you don't use ANY "php_value" or "php_admin_value" or "php_flag" or "php_admin_flag" directives in httpd.conf / .htaccess files? (In ANY virtual host you might have there) [2003-08-25 05:08:34] php at lansco dot de I have tested it right now with this command line: # watch -n 1 "wget http://www.lansco.de/php/bug-25172.php -q -O xxx;cat xxx>>zzz;tail -n 30 zzz" For about 10 minutes no error occured. After that time in nearly every request I have had this error for about 30 times. I added the line if(!isset($HTTP_HOST)) phpinfo(); to http://www.lansco.de/php/bug-25172.php and there is a really surprising phenomenon: In the phpinfo()-output HTTP_HOST is correctly set to www.lansco.de!!! register_globals is only set by the php.ini-file. Please try again and test it for about 20 to 30 minutes. [2003-08-24 22:57:32] [EMAIL PROTECTED] Your test site shows the correct output all the time.. Have you checked phpinfo() output when this happens? (add it to your test script) What is in section "Apache Environment" for HTTP_HOST then? (be sure the script gives the error about $HTTP_HOST being undefined) What is register_globals setting set to at that time? (phpinfo(), both values) [2003-08-22 03:52:04] php at lansco dot de I can reproduce the error with - 4.3.2 - 4.3.3-rc4 - 4.3.3-rc5-dev I cannot reproduce the error with - 4.3.1 I run all the test-series on the same machine (www.lansco.de). Use this command line to test it on my server: watch -n 1 "wget http://www.lansco.de/php/bug-25172.php -q -O xxx;cat xxx>>zzz;tail -n 30 zzz" After a few minutes you can see the errors in the zzz-file. [2003-08-22 01:49:55] php at lansco dot de 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 The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/25172 -- Edit this bug report at http://bugs.php.net/?id=25172&edit=1
#25172 [Fbk->Opn]: register_globals=on and $HTTP_HOST sometimes empty
ID: 25172 User updated by: php at lansco dot de Reported By: php at lansco dot de -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: Linux PHP Version: 4.3.3RC5-dev New Comment: I have tested it right now with this command line: # watch -n 1 "wget http://www.lansco.de/php/bug-25172.php -q -O xxx;cat xxx>>zzz;tail -n 30 zzz" For about 10 minutes no error occured. After that time in nearly every request I have had this error for about 30 times. I added the line if(!isset($HTTP_HOST)) phpinfo(); to http://www.lansco.de/php/bug-25172.php and there is a really surprising phenomenon: In the phpinfo()-output HTTP_HOST is correctly set to www.lansco.de!!! register_globals is only set by the php.ini-file. Please try again and test it for about 20 to 30 minutes. Previous Comments: [2003-08-24 22:57:32] [EMAIL PROTECTED] Your test site shows the correct output all the time.. Have you checked phpinfo() output when this happens? (add it to your test script) What is in section "Apache Environment" for HTTP_HOST then? (be sure the script gives the error about $HTTP_HOST being undefined) What is register_globals setting set to at that time? (phpinfo(), both values) [2003-08-22 03:52:04] php at lansco dot de I can reproduce the error with - 4.3.2 - 4.3.3-rc4 - 4.3.3-rc5-dev I cannot reproduce the error with - 4.3.1 I run all the test-series on the same machine (www.lansco.de). Use this command line to test it on my server: watch -n 1 "wget http://www.lansco.de/php/bug-25172.php -q -O xxx;cat xxx>>zzz;tail -n 30 zzz" After a few minutes you can see the errors in the zzz-file. [2003-08-22 01:49:55] php at lansco dot de 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 [2003-08-21 18:11:52] [EMAIL PROTECTED] 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: '; var_dump($HTTP_HOST); var_dump($_SERVER['HTTP_HOST']); echo ''; ?> I can not reproduce this.. [2003-08-21 08:38:25] php at lansco dot de Apache-configure: "./configure" \ "--prefix=/usr/local/apache2" \ "--with-mpm=prefork" \ "--enable-modules=deflate expires include info rewrite ssl unique_id usertrack log_config logio rewrite vhost_alias so ext_filter dav headers speling" PHP-configure: './configure' '--with-mysql=/usr/local/mysql' '--enable-ftp' '--with-gd' '--with-gd-dir=/usr/local' '--with-jpeg' '--with-jpeg-dir=/usr/local' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-gettext' '--with-mcrypt' '--with-imap' '--with-imap-ssl' '--with-ldap' '--with-zlib-dir=/usr/include' '--enable-xslt' '--with-xslt-sablot' '--enable-exif' The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/25172 -- Edit this bug report at http://bugs.php.net/?id=25172&edit=1
#25172 [Fbk->Opn]: register_globals=on and $HTTP_HOST sometimes empty
ID: 25172 User updated by: php at lansco dot de Reported By: php at lansco dot de -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: Linux PHP Version: 4.3.3RC5-dev New Comment: 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 Previous Comments: [2003-08-21 18:11:52] [EMAIL PROTECTED] 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: '; var_dump($HTTP_HOST); var_dump($_SERVER['HTTP_HOST']); echo ''; ?> I can not reproduce this.. [2003-08-21 08:38:25] php at lansco dot de Apache-configure: "./configure" \ "--prefix=/usr/local/apache2" \ "--with-mpm=prefork" \ "--enable-modules=deflate expires include info rewrite ssl unique_id usertrack log_config logio rewrite vhost_alias so ext_filter dav headers speling" PHP-configure: './configure' '--with-mysql=/usr/local/mysql' '--enable-ftp' '--with-gd' '--with-gd-dir=/usr/local' '--with-jpeg' '--with-jpeg-dir=/usr/local' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-gettext' '--with-mcrypt' '--with-imap' '--with-imap-ssl' '--with-ldap' '--with-zlib-dir=/usr/include' '--enable-xslt' '--with-xslt-sablot' '--enable-exif' [2003-08-21 08:29:30] [EMAIL PROTECTED] What was the configure line used to configure Apache? (And PHP too) [2003-08-21 08:25:51] php at lansco dot de variables_order = EGPCS gpc_order = GPC Apache Version = Apache/2.0.47 (Unix) mod_ssl/2.0.47 OpenSSL/0.9.6c DAV/2 PHP/4.3.3RC5-dev [2003-08-21 08:18:11] [EMAIL PROTECTED] What are your variables_order and gpc_order settings? (from phpinfo() output) Which webserver? Apache? What version? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/25172 -- Edit this bug report at http://bugs.php.net/?id=25172&edit=1
#25172 [Fbk->Opn]: register_globals=on and $HTTP_HOST sometimes empty
ID: 25172 User updated by: php at lansco dot de Reported By: php at lansco dot de -Status: Feedback +Status: Open Bug Type: *General Issues Operating System: Linux PHP Version: 4.3.2 New Comment: Apache-configure: "./configure" \ "--prefix=/usr/local/apache2" \ "--with-mpm=prefork" \ "--enable-modules=deflate expires include info rewrite ssl unique_id usertrack log_config logio rewrite vhost_alias so ext_filter dav headers speling" PHP-configure: './configure' '--with-mysql=/usr/local/mysql' '--enable-ftp' '--with-gd' '--with-gd-dir=/usr/local' '--with-jpeg' '--with-jpeg-dir=/usr/local' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-gettext' '--with-mcrypt' '--with-imap' '--with-imap-ssl' '--with-ldap' '--with-zlib-dir=/usr/include' '--enable-xslt' '--with-xslt-sablot' '--enable-exif' Previous Comments: [2003-08-21 08:29:30] [EMAIL PROTECTED] What was the configure line used to configure Apache? (And PHP too) [2003-08-21 08:25:51] php at lansco dot de variables_order = EGPCS gpc_order = GPC Apache Version = Apache/2.0.47 (Unix) mod_ssl/2.0.47 OpenSSL/0.9.6c DAV/2 PHP/4.3.3RC5-dev [2003-08-21 08:18:11] [EMAIL PROTECTED] What are your variables_order and gpc_order settings? (from phpinfo() output) Which webserver? Apache? What version? [2003-08-21 03:21:41] php at lansco dot de With http://snaps.php.net/php4-STABLE-latest.tar.gz the error also occurs :( [2003-08-20 17:31:39] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/25172 -- Edit this bug report at http://bugs.php.net/?id=25172&edit=1
#25172 [Fbk->Opn]: register_globals=on and $HTTP_HOST sometimes empty
ID: 25172 User updated by: php at lansco dot de Reported By: php at lansco dot de -Status: Feedback +Status: Open Bug Type: *General Issues Operating System: Linux PHP Version: 4.3.2 New Comment: variables_order = EGPCS gpc_order = GPC Apache Version = Apache/2.0.47 (Unix) mod_ssl/2.0.47 OpenSSL/0.9.6c DAV/2 PHP/4.3.3RC5-dev Previous Comments: [2003-08-21 08:18:11] [EMAIL PROTECTED] What are your variables_order and gpc_order settings? (from phpinfo() output) Which webserver? Apache? What version? [2003-08-21 03:21:41] php at lansco dot de With http://snaps.php.net/php4-STABLE-latest.tar.gz the error also occurs :( [2003-08-20 17:31:39] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-08-20 05:03:43] 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 -- Edit this bug report at http://bugs.php.net/?id=25172&edit=1
#25172 [Fbk->Opn]: register_globals=on and $HTTP_HOST sometimes empty
ID: 25172 User updated by: php at lansco dot de -Reported By: php at lnetz dot de +Reported By: php at lansco dot de -Status: Feedback +Status: Open Bug Type: *General Issues Operating System: Linux PHP Version: 4.3.2 New Comment: With http://snaps.php.net/php4-STABLE-latest.tar.gz the error also occurs :( Previous Comments: [2003-08-20 17:31:39] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-08-20 05:03:43] 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 -- Edit this bug report at http://bugs.php.net/?id=25172&edit=1