Session variables confusion
| From: | Sebastian Bergmann | Date: | Sat, 10 Nov 2001 23:02:56 +0000 |
| Subject: | Session variables confusion | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-70031@lists.php.net to get a copy of this message | ||
Environment: Current CVS on Win32.
<?php
session_register('a');
session_register('b');
session_register('c');
echo 'GLOBALS[a]: ' . ++$GLOBALS['a'] .
'<br>';
echo '_SESSION[b]: ' . ++$_SESSION['b'] .
'<br>';
echo 'HTTP_SESSION_VARS[c]: ' . ++$HTTP_SESSION_VARS['c'] .
'<br>';
?>
register_globals = On -> Only ++$GLOBALS['a'] is effective
register_globals = Off -> ++$GLOBALS['a'] is not effective, the other
two work (ie. the numbers increase on sub-
sequent requests)
At the conference Rasmus told me that the $HTTP_SESSION_VARS array
should work in _both_ situations. Is this broken, or intended? I'm
confused right now - which is a no so uncommon situation nowadays :-)
Greetings,
Sebastian
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/