From: graced at monroe dot wednet dot edu Operating system: Irrelevant PHP version: 5.2.0 PHP Bug Type: Feature/Change Request Bug description: FREQ: Ability to access sessions without increasing their lifetime
Description: ------------ It's not readily apparent whether there is any way to do this with PHP's built-in session handler, so I figured I would write a request: It would be nice to have a way to access a session (ala session_start()) in such a way where the lifetime of that session is not extended. The intended application is for a PHP script that responds to polling (through Javascript) every ~5 minutes to report any new events. For example, Javascript code might poll the server periodically to see if the user has any new messages on a forum. Using session_start() in this situation is not neccessarily ideal as it would keep the user perpetually logged in until their webbrowser was closed. The idea is that interactive actions (a user clicking on a link to another page on the site or submitting a form) should continue to increase the lifetime of a session, but noninteractive ones should not. However, they should still be able to access (and potentially modify) session variables. Additionally, with this feature an additional function (session_lifetime_remaining?) which returns the number of seconds until a session expires would be ideal -- allowing a user to be warned of impending logout due to inactivity. -- Edit bug report at http://bugs.php.net/?id=40275&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40275&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40275&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40275&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40275&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40275&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40275&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40275&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40275&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40275&r=support Expected behavior: http://bugs.php.net/fix.php?id=40275&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40275&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40275&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40275&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40275&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40275&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40275&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40275&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40275&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40275&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40275&r=mysqlcfg