Sessions:: Ability to extend Cookie expire times?

From: Date: Wed, 07 Jun 2000 20:34:10 +0000
Subject: Sessions:: Ability to extend Cookie expire times?
Groups: php.dev 
Request: Send a blank email to php-dev+get-20498@lists.php.net to get a copy of this message
In using the cookie method of tracking a session is it possible to extend the expire time when the user returns again and again. I did not see any way to have the cookie sent again by the session module once a session is already registered and the browser is still sending this cookie. Since i didn't see this i propose the following... a test case: I visit a web site for the first time and get sent a cookie containing an id via the session functions in PHP4 and lets say this cookie has an expire time one week from now. I continue to visit the site several times in the next few days, all the while sending this cookie in my requests but never getting it sent back to me again. Then on the one week anniversary i get a new cookie with a new id since my original cookie has expired. At this point all data that i may have registered using the id from my first cookie is no longer tied to me and i appear as a new user to the web site applications. What i propose is a way to tell the session management code that i want it to renew the cookie for me, thus increasing the expire time with every visit. I could try to add a setcookie() in one of my functions that are set up with session_set_save_handler(). Although i think it would make more sense for the session management code to be able to do this. If this is already possible, then i apologize for the ramblings. Thanks, -ab

« previous php.dev (#20498) next »