ID: 24253
Updated by: [EMAIL PROTECTED]
Reported By: tim at digicol dot de
-Status: Open
+Status: Critical
Bug Type: Scripting Engine problem
Operating System: Red Hat 7.3 (Linux 2.4.18-3)
PHP Version: 4.3.3RC1
Previous Comments:
------------------------------------------------------------------------
[2003-06-19 03:43:23] tim at digicol dot de
Description:
------------
My PHP is compiled statically into Apache 1.3.27:
./configure --with-mysql --with-oracle --with-oci8 --enable-sigchild
--with-db3 --with-ldap --with-zlib --with-gd
--with-mcrypt=/usr/local/libmcrypt-2.5.7 --with-curl=/usr/local
--with-apache=/usr/local/apache_1.3.27
In PHP 4.3.3RC1, the variables $DOCUMENT_ROOT and $PHP_SELF seem to
have disappeared completely, even if register_globals is on.
Accessing these variables through $_SERVER or $HTTP_SERVER_VARS works
fine.
In PHP 4.3.2 (and - to my knowledge - in all previous 3.x and 4.x
versions), $DOCUMENT_ROOT and $PHP_SELF are there as long as
register_globals is on.
This breaks backwards compatibility quite awfully. Any chance that this
change will be reverted? (If not, please at least make a big note in
the NEWS/ChangeLog...)
I'm no C programmer and I don't understand what's going on there, but I
saw that php4/main/php_variables.c had been changed...
Reproduce code:
---------------
register_globals: "<?=ini_get('register_globals')?>"
$PHP_SELF: "<?=$PHP_SELF?>"
$_SERVER[ PHP_SELF ]: "<?=$_SERVER[ 'PHP_SELF' ]?>"
$DOCUMENT_ROOT: "<?=$DOCUMENT_ROOT?>"
$_SERVER[ DOCUMENT_ROOT ]: "<?=$_SERVER[ 'DOCUMENT_ROOT' ]?>"
Expected result:
----------------
register_globals: "1"
$PHP_SELF: "/test.php"
$_SERVER[ PHP_SELF ]: "/test.php"
$DOCUMENT_ROOT: "/home/www"
$_SERVER[ DOCUMENT_ROOT ]: "/home/www"
Actual result:
--------------
register_globals: "1"
$PHP_SELF: ""
$_SERVER[ PHP_SELF ]: "/test.php"
$DOCUMENT_ROOT: ""
$_SERVER[ DOCUMENT_ROOT ]: "/home/www"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24253&edit=1