php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #4989 Sessions:: Add Ability to extend Cookie expire times.
Submitted: 2000-06-12 19:08 UTC Modified: 2000-07-20 20:19 UTC
From: abush at microcenter dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.0 Release OS: ALL
Private report: No CVE-ID: None
 [2000-06-12 19:08 UTC] abush at microcenter dot com
I had posted as a normal message before and received no response, so I'll try again as a feature request:
===========
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.

Where does this modification belong?  As a function all its own or as an optional argument to an existing function?  I would be willing to work on this, if it is thought to be a good/proper idea to implement.

Thanks,
-ab


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-20 20:19 UTC] sterling at cvs dot php dot net
session_set_cookie_params().
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Jun 14 13:00:01 2026 UTC