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

From: Date: Fri, 28 Mar 2014 09:41:05 +0000
Subject: Re: session_reset() and session_abort() to send errors
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-73466@lists.php.net to get a copy of this message
Hi, On Fri, Mar 28, 2014 at 8:54 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > Hi Andrey, > > On Wed, Mar 26, 2014 at 1:06 AM, Andrey Andreev <narf@devilix.net> 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. Well, I just re-checked it and does indeed just call php_session_initialize(), so what's the point? Shorthand for session_abort() && session_start() ? Cheers, Andrey.

« previous php.internals (#73466) next »