Re: Re: session problems with own session handler in php..

From: Date: Fri, 18 Jan 2002 16:43:56 +0000
Subject: Re: Re: session problems with own session handler in php..
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-77450@lists.php.net to get a copy of this message
> Derick Rethans wrote: > > On Fri, 18 Jan 2002, Yasuo Ohgaki wrote: > > > > > >>>Well, as for me, with some checking I did yesterday when I did my first > >>>post. In the beginning of the script print_r($_SESSION); returns > >>>nothing, but after settings some values, print_r returns it an > >>>associated array. > >>> > >>>Never tested on HTTP_SESSION_VARS though, should there be a difference? > >>> > >>It's the same hash. > >> > > > > It's not AFAIK > > > > > It should be or I'm missing something :) > > MAKE_STD_ZVAL(PS(http_session_vars)); > array_init(PS(http_session_vars)); > ZEND_SET_GLOBAL_VAR_WITH_LENGTH("HTTP_SESSION_VARS", > sizeof("HTTP_SESSION_VARS"), PS(http_session_vars), 1, 0); > ZEND_SET_GLOBAL_VAR_WITH_LENGTH("_SESSION", sizeof("_SESSION"), > PS(http_session_vars), 1, 0); Hmm, I've located this so far: If my read function returns (true or false) both HTTP_SESSION_VARS and _SESSION are NULL after session_start(); and when I set a var i _SESSION, HTTP_SESSION_VARS is still NULL. However, if my read function returns "", then both HTTP_SESSION_VARS and _SESSION are set to array(0) {}, and both have the same contents after I set something in _SESSION. And this is exactly whats in the session_set_save_handler docs, so, I guess this is a bogus user error :) regards Robin

« previous php.dev (#77450) next »