Req #53713 [Asn->Opn]: Add sqlite3 session handler

From: Date: Tue, 24 Oct 2017 06:13:07 +0000
Subject: Req #53713 [Asn->Opn]: Add sqlite3 session handler
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211979@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=53713&edit=1 ID: 53713 Updated by: kalle@php.net Reported by: jinmoku at hotmail dot com Summary: Add sqlite3 session handler -Status: Assigned +Status: Open Type: Feature/Change Request Package: SQLite related PHP Version: 5.3.5 -Assigned To: scottmac +Assigned To: Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2014-04-22 19:04:38] webmaster at tubo-world dot de Locking in sqlite could be implemented using "begin immediate transaction" in read() and commiting in write() or close(). ------------------------------------------------------------------------ [2014-04-22 19:01:39] webmaster at tubo-world dot de The current implementation does not use locking (the old one in https://github.com/php/php-src/blob/PHP-5.3/ext/sqlite/sess_sqlite.c did not lock either). This makes session handling fragile to race conditions, e.g. two parallel requests accessing the same session data. It results in data loss. For this reason the files session handler locks individual sessions. But since sqlite only supports database locking and no row locking, using locking in sqlite would mean that only one session can be read -> write at a time. Even different sessions would wait for another to finish, i.e. no parallel requests at all. So using sqlite for sessions is highly questionable. Either you have race conditions or you have no parallel requests. ------------------------------------------------------------------------ [2014-03-06 13:40:40] narf at devilix dot net +1 in general, but I don't know if it's feasible ... 1. Sessions should be fast; trying to create a new database and/or table would slow them down. 2. I'm not sure if SQLite can handle concurrency at all. ------------------------------------------------------------------------ [2013-10-12 12:18:20] jmshinn+php at gmail dot com Has this issue seriously been hanging out there, fixed but not incorporated into the distribution, for 2+ years? How is this acceptable at all? ------------------------------------------------------------------------ [2013-06-20 21:29:01] krebs dot seb at gmail dot com I wonder, why this patch isn't applied. The "looks good"-statement is two years old... Is scottmac even out there? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=53713 -- Edit this bug report at https://bugs.php.net/bug.php?id=53713&edit=1

« previous php.bugs (#211979) next »