|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-06-20 12:00 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 19:00:02 2025 UTC |
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"