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

Bug #13084 Idle property and Expiry property don't work
Submitted: 2008-02-07 14:37 UTC
From: darizotas Assigned: till
Status: Closed Package: HTTP_Session2 (version 0.7.0)
PHP Version: 5.2.1 OS: Windows XP SP2
Roadmaps: 0.7.1    
Subscription  


 [2008-02-07 14:37 UTC] darizotas (Dario Borreguero)
Description: ------------ Idle property and Expiry property are stored in $GLOBALS variable instead of $_SESSION variable. Therefore, they don't keep the values among scripts. Methods setIdle, setSessionValidThru, setExpire, isIdle should use the following variables: 1. $_SESSION['__HTTP_Session2_Expire'] 2. $_SESSION['__HTTP_Session2_Idle'] Instead of 1. $GLOBALS['__HTTP_Session2_Expire'] 2. $GLOBALS['__HTTP_Session2_Idle'] This bug is related to the bug 13023 on version 0.6.2

Comments

 [2008-02-07 14:57 UTC] till (Till Klampaeckel)
Hi, it works. What makes you think it doesn't? The parameters store runtime specific info, and nothing but. They do not do anything to extend your session etc.. I need a use-case of where it doesn't work and will help you trouble shoot. Till
 [2008-02-07 15:21 UTC] darizotas (Dario Borreguero)
Hi again, Just try the following: 1. Create two files: File1.php and File2.php. Code below described. 2. Put them in the public folder of your Web Server. 3. Open your browser and go to File1. E.g.: http://localhost/File1.php 4. Wait 25 seconds and click on the link! You'll notice that the session is still active, when you set to last 20 seconds. Code: File1.php <?php require_once 'HTTP/Session2.php'; HTTP_Session2::start(); // Reviewing the code we could realize that a time-stamp: time() // is not needed. HTTP_Session2::setIdle(20); echo 'Session started, <a href="File2.php">Continue after 20sec</a>'; ?> File2.php <?php HTTP_Session2::start(); if (HTTP_Session2::isIdle()) echo 'Your session has expired'; else echo 'You're still in'; ?> Please check methods setExpire, setIdle, sessionValidThru, isExpired and isIdle from package HTTP_Session. It uses $_SESSION variable to store all this information and it works properly.
 [2008-02-17 13:38 UTC] till (Till Klampaeckel)
I can see what you are saying. It looked like someone half-fixed it in there. Apologies for that. I checked in the changes it into CVS. Can you give it a try and report back also? If you need me to roll a package for you to test, also let me know! Thanks again!
 [2008-02-18 09:02 UTC] darizotas (Dario Borreguero)
I've downloaded the CVS version and it seems to work as expected. Thanks again, I will wait for the new release. Dario.
 [2008-02-18 12:20 UTC] till (Till Klampaeckel)
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.