Re: [RFC] Object oriented session handlers
| From: | Arpad Ray | Date: | Mon, 27 Jun 2011 16:01:57 +0000 |
| Subject: | Re: [RFC] Object oriented session handlers | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53602@lists.php.net to get a copy of this message | ||
On Mon, Jun 27, 2011 at 5:00 PM, Arpad Ray <arraypad@gmail.com> wrote:
> On Mon, Jun 27, 2011 at 4:52 AM, Larry Garfield <larry@garfieldtech.com> wrote:
>> I'm a bit confused. If the session handler goes out of its way to ensure
>> that it's the last thing to run, wouldn't that cause an issue if it tries to
>> write session data after, say, the database connection object it wants to
>> use has already been cleaned up? Or is that the use case for the "do not
>> register" parameter? It seems like it would be a fairly common use case...
>>
>
> If the database object isn't manually cleaned up (all references to it
> are unset) then that will take place in the second stage of the
> request shutdown process, whereas the first stage is running the
> shutdown functions, so that shouldn't be an issue.
>
> The most common use case for the second argument is where the user
> already calls session_write_close() (probably in their own shutdown
> function) and doesn't reopen it - it's then useless for us to register
> and call our shutdown function.
>
> Regards,
>
> Arpad
>
Oops, CCing the list again.