Doc #55624 [NEW]: session_set_save_handler should mention locking

From: Date: Tue, 06 Sep 2011 17:41:10 +0000
Subject: Doc #55624 [NEW]: session_set_save_handler should mention locking
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7151@lists.php.net to get a copy of this message
From: tyrael Operating system: PHP version: Irrelevant Package: Session related Bug Type: Documentation Problem Bug description:session_set_save_handler should mention locking Description: ------------ I've learned a couple of years ago the hard way that the default session handler uses locking(flock) for locking the session files, so there couldn't be two concurrent script execution with the same session id. However when people started using their own session handlers, they usually get the concept from the example in the php manual, which doesn't mention that what are the pros/cons for serializing the session execution. I would suggest to add the flock call to the example implementation, and add a note about the potential problems if no locking mechanism is implemented (potential dataloss, concurrent requests can overwrite each others data, that there is no guarantee that two ajax request will be served in the same order, etc.). heck, even the memcache ext (http://pecl.php.net/package-changelog.php? package=memcache) was bitten by this problem. -- Edit bug report at https://bugs.php.net/bug.php?id=55624&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55624&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55624&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55624&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55624&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55624&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55624&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55624&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55624&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55624&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55624&r=support Expected behavior: https://bugs.php.net/fix.php?id=55624&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55624&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55624&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55624&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55624&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55624&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55624&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55624&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55624&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55624&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55624&r=mysqlcfg

« previous php.doc.bugs (#7151) next »