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)    

 [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


 [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 by the end of next Sunday (CET). If this was a problem with the 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.