Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.5.6

Bug #2834 Unable to handle start() call after destroy() using DB container
Submitted: 2004-11-26 14:23 UTC
From: jderks Assigned: troehr
Status: Closed Package: HTTP_Session
PHP Version: 4.3.8 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 35 + 23 = ?

 
 [2004-11-26 14:23 UTC] jderks
Description: ------------ Upon destroying a session and then starting a new one (e.g. to generate a new session ID on hosts that are running PHP < 4.3.2 and as such do not have the session_regenerate_id() function) a fatal error occurs because the user-supplied session handler is no longer in use after destroy(), while the session_module_name still equals 'user'. It seems the best way to fix it is to call the setContainer() call in function destroy() if any container was is use. Reproduce code: --------------- <?php require_once 'HTTP/Session.php'; HTTP_Session::setContainer('DB', array('dsn' => 'mysql://root@localhost/database', 'table' => 'sessiondata')); HTTP_Session::start(); HTTP_Session::destroy(); HTTP_Session::start(); ?> Expected result: ---------------- No output Actual result: -------------- Fatal error: session_start(): Failed to initialize storage module: user (path: /tmp) in http_session.php on line 245

Comments

 [2005-09-02 21:13 UTC] torsten dot roehr at gmx dot de
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.