Re: session_reset() and session_abort() to send errors

From: Date: Fri, 28 Mar 2014 06:54:22 +0000
Subject: Re: session_reset() and session_abort() to send errors
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi Andrey,

On Wed, Mar 26, 2014 at 1:06 AM, Andrey Andreev <[email protected]> wrote:

> From what I understand, session_reset() not only discards changes to
> $_SESSION and not just re-reads the data, but re-initializes the whole
> session. This includes calls to open(), read(), which include opening
> file pointers, setting locks, checking session ID validity, etc. I
> don't know how safe that is to do internally, but with a userland
> session handler, it means discarding previously open connections/file
> pointers, locks and whoever knows what else a developer might've
> cached, assuming that open(), read() would only be called once.
> It would've also been better IMO if the function was called
> session_restart() instead, because of the above-described behavior.
>

It's safe. Don't worry.
As always, I prefer better names.

Regards,

--
Yasuo Ohgaki
[email protected]


Thread (15 messages)

« previous php.internals (#73457) next »