Re[4]: [Phplib-users] Re[4]: [PHP] PHPlib sessions without a DB?
Brought to you by:
nhruby,
richardarcher
|
From: Maxim D. <max...@bo...> - 2002-04-29 13:51:56
|
Hello Matt, Monday, April 29, 2002, 5:04:01 PM, you wrote: MW> I saw something on the list this morning about using session_register if MW> using $_SESSION or $HTTP_SESSION_VARS, and since found this bit in the manual. MW> <snip> MW> If you are using MW> $HTTP_SESSION_VARS/$_SESSION, MW> do not use session_register(), MW> session_is_registered() and session_unregister(). MW> </snip> MW> I also noticed that in session4 the function register uses session_register, MW> should this not be $_SESSION or $HTTP_SESSION_VARS? Yes, I see. The new order is coming :) Well .... If I rewrite all the things corresponding to the manual, the class will stop work under pre-4.1, because registering/unregistering session variables using direct assignment to the $HTTP_SESSION_VARS or $_SESSION was introdused first in 4.1. I guess the fix would be a simple thing, which checks for a version & register_globals settings and uses different register/unregister/is_registered ways to do things. MW> As I say everything works with register globals off and the old sessions. Yes, because the old Session pushes the registered variables into the global scope. It does not depend on register_globals, because its variables are always global. -- 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 |