This is expected behaviour as far as I am concerned. When register_globals is off the $session[] array is completely separate from $HTTP_SESSION_VARS['session'] so doing a session_register('session') is replacing the existing registered variable with this completely new one.
-Rasmus On Fri, 5 Oct 2001, Sebastian Bergmann wrote: > I just noticed the following with PHP 4.0.8-dev, built from CVS today: > > When register_globals is enabled, this script > > <?php > session_register('session'); > $session[] = time(); > ?> > <pre> > <?php > echo session_id().'<br>'; > print_r($session); > ?> > > outputs an array that grows with each request to the script. > > When register_globals is disabled, it only outputs the timestamp of > the current request. > > Since the displayed session_id does not change between requests, it > is not the session itself that 'gets lost' when register_globals is > disabled, but 'only' the variables contents. > > Now: Is this intended behaviour and I just never happened to notice it > since I disabled register_globals for the first time today, or is > this a bug? > > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]