#37381 [Com]: auto_globals_jit fails to correctly intialize variables
ID: 37381 Comment by: php at modem-help dot com Reported By: gcp at sjeng dot org Status: No Feedback Bug Type: Variables related Operating System: FreeBSD 6.0 PHP Version: 5.1.4 New Comment: PHP 5.1.6 (RedHat FC6; std PHP, Apache; fully updated) `auto_globals_jit = On' works fine with 'normal' PHP scripts. However, when included via `auto_prepend_file' $_SERVER is completely absent (together with other Globals). Test case: file script: httpd.conf: AddType application/x-httpd-php .html php_value auto_prepend_file "/path/to/test/file" php.ini: variables_order = "EGPCS" register_globals = Off register_long_arrays = Off register_argc_argv = On auto_globals_jit = On The above produces nothing ($_SERVER is absent). Change `auto_globals_jit' to `Off' (plus `apachectl graceful') and it works. Time to pay attention to this, folks. - Alex Kemp Previous Comments: [2006-06-09 11:01:45] me at thomaskeller dot biz I forgot to mention: I'm using the apache2handler with httpd-2.2.0 [2006-06-09 10:57:48] me at thomaskeller dot biz I've encountered the same problem, with a normal rpm installation of php-5.1.4-1 which ships with FC5. A simple reproducable script would be which returns NULL if auto_globals_jit is set to on (default in this rpm package). This is the same deal with $_REQUEST, which is also NULL. Now, even if auto_globals_jit is set to false, $_GLOBALS is still not available. [2006-06-01 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2006-05-24 21:59:33] [EMAIL PROTECTED] Unfortunately, I don't think anybody will be able to find time to debug phpMyAdmin. So please provide a short but complete reproduce script to speedup the resolution of the issue. [2006-05-10 11:19:09] gcp at sjeng dot org I don't know of any small testcase. As indicated, this is 100% a regression in PHP 5.1.3 or 5.1.4 compared to 5.1.2, it's possible to make it appear/disappear by toggling the indicated PHP setting, and it happens with a very popular PHP package, in the routine mentioned earlier. I can provide help tracing the issue, but I do not have a "10-20 line reproducible case". 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/37381 -- Edit this bug report at http://bugs.php.net/?id=37381&edit=1
#37381 [Com]: auto_globals_jit fails to correctly intialize variables
ID: 37381 Comment by: me at thomaskeller dot biz Reported By: gcp at sjeng dot org Status: No Feedback Bug Type: Variables related Operating System: FreeBSD 6.0 PHP Version: 5.1.4 New Comment: I forgot to mention: I'm using the apache2handler with httpd-2.2.0 Previous Comments: [2006-06-09 10:57:48] me at thomaskeller dot biz I've encountered the same problem, with a normal rpm installation of php-5.1.4-1 which ships with FC5. A simple reproducable script would be which returns NULL if auto_globals_jit is set to on (default in this rpm package). This is the same deal with $_REQUEST, which is also NULL. Now, even if auto_globals_jit is set to false, $_GLOBALS is still not available. [2006-06-01 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2006-05-24 21:59:33] [EMAIL PROTECTED] Unfortunately, I don't think anybody will be able to find time to debug phpMyAdmin. So please provide a short but complete reproduce script to speedup the resolution of the issue. [2006-05-10 11:19:09] gcp at sjeng dot org I don't know of any small testcase. As indicated, this is 100% a regression in PHP 5.1.3 or 5.1.4 compared to 5.1.2, it's possible to make it appear/disappear by toggling the indicated PHP setting, and it happens with a very popular PHP package, in the routine mentioned earlier. I can provide help tracing the issue, but I do not have a "10-20 line reproducible case". [2006-05-10 10:14:28] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. 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/37381 -- Edit this bug report at http://bugs.php.net/?id=37381&edit=1
#37381 [Com]: auto_globals_jit fails to correctly intialize variables
ID: 37381 Comment by: me at thomaskeller dot biz Reported By: gcp at sjeng dot org Status: No Feedback Bug Type: Variables related Operating System: FreeBSD 6.0 PHP Version: 5.1.4 New Comment: I've encountered the same problem, with a normal rpm installation of php-5.1.4-1 which ships with FC5. A simple reproducable script would be which returns NULL if auto_globals_jit is set to on (default in this rpm package). This is the same deal with $_REQUEST, which is also NULL. Now, even if auto_globals_jit is set to false, $_GLOBALS is still not available. Previous Comments: [2006-06-01 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2006-05-24 21:59:33] [EMAIL PROTECTED] Unfortunately, I don't think anybody will be able to find time to debug phpMyAdmin. So please provide a short but complete reproduce script to speedup the resolution of the issue. [2006-05-10 11:19:09] gcp at sjeng dot org I don't know of any small testcase. As indicated, this is 100% a regression in PHP 5.1.3 or 5.1.4 compared to 5.1.2, it's possible to make it appear/disappear by toggling the indicated PHP setting, and it happens with a very popular PHP package, in the routine mentioned earlier. I can provide help tracing the issue, but I do not have a "10-20 line reproducible case". [2006-05-10 10:14:28] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. [2006-05-09 14:14:16] gcp at sjeng dot org Description: In some circumstances, global variables will fail to be initialized when auto_globals_jit is enabled (the default). This is a regression, the problem did not exist in 5.1.2. php.ini is default recommended one. Server is lighttpd 1.4.11 using PHP in FastCGI mode. Reproduce code: --- Using for example, phpMyAdmin 2.8.0.3, and looking in the libaries/Config.class.php code: function checkPmaAbsoluteUri() { // Setup a default value to let the people and lazy syadmins work anyway, // they'll get an error if the autodetect code doesn't work $pma_absolute_uri = $this->get('PmaAbsoluteUri'); if ( strlen($pma_absolute_uri) < 1 ) { $url = array(); // At first we try to parse REQUEST_URI, it might contain full URI if ( ! empty($_SERVER['REQUEST_URI'] ) ) { $url = parse_url($_SERVER['REQUEST_URI']); } // If we don't have scheme, we didn't have full URL so we need to // dig deeper if ( empty( $url['scheme'] ) ) { // Scheme if ( ! empty( $_SERVER['HTTP_SCHEME'] ) ) { $url['scheme'] = $_SERVER['HTTP_SCHEME']; } else { $url['scheme'] = !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off' ? 'https' : 'http'; } etc... It's possible to enter this function with $_SERVER missing essential things such as HTTP_HOST: array(4) { ["PHP_SELF"]=> string(21) "/mysqladmin/index.php" ["PHP_AUTH_USER"]=> (censored) ["PHP_AUTH_PW"]=> (censored) ["REQUEST_TIME"]=> int(1147178223) } If auto_global_jit is disabled, this does not not happen, and HTTP_HOST etc are set correctly. -- Edit this bug report at http://bugs.php.net/?id=37381&edit=1