Re: Lazy writing in the session, session-lock-ini, and bug #68331

From: Date: Thu, 06 Nov 2014 08:42:33 +0000
Subject: Re: Lazy writing in the session, session-lock-ini, and bug #68331
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-78795@lists.php.net to get a copy of this message
Hi, On Thu, Nov 6, 2014 at 4:02 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > HI all, > > On Thu, Nov 6, 2014 at 6:30 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > >> On Wed, Nov 5, 2014 at 10:54 AM, Damian Wadley <php@requinix.net> wrote: >> >>> Apparently this caused >>> problems for some people as they made 68331 a few days ago. >>> >> >> Just a quick note for this. The user would like to access session >> data(session handler) >> regardless of data modification. I suppose it could be solved if session >> has user space >> "update" handler as I suggested originally. >> >> Alternatively, session_write_close()/session_commit() may be changed, so >> that it >> is called unconditionally during shutdown. I have to read the code to be >> sure if this is possible. >> >> BTW, anyone know the reason why the user need to call >> session_write_close()/session_commit() >> unconditionally? Accounting, perhaps? >> > > The issue user has reported could be solved easily by calling write API > during shutdown, IIRC. > An explicit flag for this might be needed. There already is such explicit flag in PHP 5.4's OOP version of session_set_save_handler(). The linked test script in the bug report also explicitly registers session_write_close() as a shutdown function. The problem isn't that there's no call, it's that _the call itself is ignored_. Cheers, Andrey.

« previous php.internals (#78795) next »