note 14717 rejected and deleted from ref.session.php by alindeman

From: Date: Sun, 12 Aug 2001 16:36:28 +0000
Subject: note 14717 rejected and deleted from ref.session.php by alindeman
Groups: php.notes 
Request: Send a blank email to php-notes+get-16607@lists.php.net to get a copy of this message
Documentation Bug: When both track_vars=on and register_globals=on, session variables may be READ using the same syntax as track_vars=on and register_globals=off. However, variables cannot be SET using this syntax. With register_globals=on, the value of the session variable MUST be referenced from a global variable or it is not preserved across pages. For example, the following code works perfectly as expected when register_globals=off. The same code fails to preserve the value of var1 when register_globals=on, despite the fact that it is registered and has a value. <?php session_start(); print_r($HTTP_SESSION_VARS); session_register('var1'); $HTTP_SESSION_VARS['var1']='val1'; ?> Tested on PHP 4.0.5, Windows NT 5.0 build 2195, Apache/1.3.20.

« previous php.notes (#16607) next »