Re[2]: [Phplib-users] session4 breaks session-handling with url()
Brought to you by:
nhruby,
richardarcher
From: Maxim D. <max...@bo...> - 2001-10-22 08:08:09
|
Hello Jens, Saturday, October 20, 2001, 3:46:44 AM, you wrote: > On Wed, Oct 17, 2001 at 11:22:07AM +0400, Maxim Derkachev wrote: >> The main reason was to determine if cookies are used before letting the >> user to browse the site. > This is not necessary any more? I suppose not. You save an unneeded redirect - the vast majority of clients still use cookies. And you always have an opportunity to pass the SID to the page, if you need to let you JS scripts no know it. >> > Yes, apparently it does not. At least not to headers. If I do a >> Strange .... it sounds to me like a PHP bug. > I'll try again (after the relaunch of our site). I mean that not appending the SID to the location headers when trans-sid is turned on sounds like a PHP bug. It could be cured only by sending a bug report to the PHP team. > I guess performance is a > lot better with session4, is it noticeable? Yes. The session4 performs at least twofold better then the Session3. The main performance gain is from the native PHP serializer/deserializer, which works much more faster then the Session3 serializer/deserializer. >> > Also, how do I find out what variables are registered in session4? The >> > session::pt[] array doesn't exist any more (IIRC). >> There's no need in this array any more. Use $sess->is_registered('var') > I can't find out that way what session variables are registered. I don't > want to know 'is X registered' but I want to 'give me a list of all > registered variables'. There's a builtin array $HTTP_SESSION_VARS. All the registered variables reside there. Use array_keys($HTTP_SESSION_VARS), or walk through it in a loop: foreach ($HTTP_SESSION_VARS as $varname => $varval) { if ($varname == 'foo') { $sess->unregister($varname); // equivalent to session_unregister($varname) } } -- Best regards, Maxim Derkachev mailto:max...@bo... System administrator & programmer, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru |