ID: 37381 User updated by: gcp at sjeng dot org Reported By: gcp at sjeng dot org -Status: Feedback +Status: Open Bug Type: Variables related Operating System: FreeBSD 6.0 PHP Version: 5.1.4 New Comment:
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". Previous Comments: ------------------------------------------------------------------------ [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 <?php and ends 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