Re: SessionHandlerInterface protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Le 23/06/2021 à 14:37, Christoph M. Becker a écrit :
On 23.06.2021 at 13:41, Mathieu Dubois wrote:

Le 23/06/2021 à 12:01, Christoph M. Becker a écrit :

Before ::read() is called, open() is called.  ::open() is suppossed to
create the empty session data, if no data for the given session exist.
This empty data string should then be returned from ::read().  If
::read() fails to read the data, it should return false (or actually any
non-string value in the current implementation) to signal failure.
I might be confused but the session id is not passed to ::open() so how
is it supposed to create the empty session data ? By using session_id ?
Ah, right, ::open() is not supposed to create the empty session data.
This can be done in ::read(); the built-in "files" handler does this,
for instance; if the file does not exist and can't be created, ::read()
fails.

OK, that was the only explanation that made sense. Do we agree that the doc could be improved by stating this more clearly ?

Mathieu

--
Mathieu Dubois - IR - UMR 8030 équipe LABGeM
CEA - Genoscope. 2 rue Gaston Crémieux. 91057 Evry Cedex France.
Bureau B07
+33 1 60 87 53 35



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux