Re[2]: [Phplib-users] php4 session fix, and some thoughts
Brought to you by:
nhruby,
richardarcher
From: Maxim D. <max...@bo...> - 2003-01-22 08:37:45
|
Hello, Joe, Wednesday, January 22, 2003, 3:52:51 AM, you wrote: JS> To make sure I understand - The auto_init file is included with every JS> pageview when using the session4.inc class. Using the session.inc it is JS> only included on session creation. This is because the value of sess->in JS> is lost so the conditional in page4.inc fails. Right. And I don't consider it a bug. I described this behavior when released the very first version of the session4[_custom] in the readme file next to the classes (still there, quite outdated, but most of it is still true). The $sess->in is not saved with session because the PHP4 sessions don't allow saving a member of an object without saving the whole object. We don't need to save $sess object with the session, don't we? It is the one of the few differences between Kristian's Session and the new Session classes with PHP4 session support. The problem can be easily fixed in the setup.inc file (or page.inc, or somewhere else). The only thing You need is to register any other variable (besides the member of the $sess object) and use it as a marker, or to check variables in the setup.inc with is_registered() before initialization. -- Best regards, Maxim Derkachev mailto:max...@bo... IT manager, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru |