RE: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime
| From: | Jaime Bozza | Date: | Mon, 19 Aug 2002 16:53:10 +0000 |
| Subject: | RE: [PHP-DEV] Re: [PHP-DOC] Re: #3793 [Ana->Opn]: session.gc_maxlifetime | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-87089@lists.php.net to get a copy of this message | ||
>But there are still a lot of cases where not writing the session data
at
>the end of a request will simplify things quite a bit and also be much
>more efficient. I am not too concerned about not writing based on
whether
>or not data changed, I'd like the user to be able to specify that it
>shouldn't be written through session_readonly(). This avoids locking
>issues in complex framed sites and avoids a lot of useless writes when
the
>author knows there will be no changes or wants to make sure that any
>inadvertent changes are not written.
This is similar to a manual fix I put into the session_handler that I
use on our sites. It's nothing more than a global variable (actually,
part of my global "application" array) that is checked upon entering my
session_write() function. If the variable is set ("nowrite"), it just
returns from the session_write() function without doing anything.
Having it built into PHP would be nice, since it would simplify
upgrades. (As well as allow me to use a built-in session handler and
still be able to support readonly sessions)
Jaime Bozza