From:             [EMAIL PROTECTED]
Operating system: FreeBSD 4.2
PHP version:      4.0.6
PHP Bug Type:     Session related
Bug description:  Assigning to multi-dimensional $HTTP_SESSION_VARS array not restored

I did:

session_register( "SESSION" );

The following array element is not restored on session_start() of next
page:

$HTTP_SESSION_VARS["SESSION"]["class_name"] = new ClassName();

Whereas any of the following are restored (each tested independently):

$SESSION["class_name"] = new ClassName();
$GLOBALS["SESSION"]["class_name"] = new ClassName();
$HTTP_SESSION_VARS["SESSION"] = new ClassName();

I also have a question which I have not tested.  Obviously this question
affects whether I can work around this bug with register_globals off.  When
register_globals is turned off, will $GLOBALS["SESSION"] still represent
the same registed session variable?  Or am I forced to use
$HTTP_SESSION_VARS in that case?  The Sessions documentation does not
mention $GLOBALS and seems to imply strongly the latter where it says:

Quoted from http://www.php.net/manual/en/ref.session.php:

"If track_vars is enabled and register_globals is disabled, only members of
the global associative array $HTTP_SESSION_VARS can be registered as
session variables. The restored session variables will only be available in
the array $HTTP_SESSION_VARS."



-- 
Edit bug report at: http://bugs.php.net/?id=13831&edit=1


-- 
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]

Reply via email to