Sorry I thought the session was expiring server side. (For that you want to reset setExp...)

Zend_Session::start();
$cp = session_get_cookie_params();
if(isset($_COOKIE[session_name()])) {
   //If session cookie has been set, extend it
setcookie(session_name(), session_id(), time() + $cp['lifetime'], $cp['path'], $cp['domain'], $cp['secure']);
}

Should extend your cookie.

K

Tim Nagel wrote:
I added the following as a test to my bootstrap: (the default, and used namespace for Zend_Auth is 'Zend_Auth')
 $namespace = new Zend_Session_NameSpace('Zend_Auth');
 $namespace->setExpirationSeconds(32473289748392);
Where that is significantly larger than the rememberMe() call. It doesnt work unfortunately, the cookie lifetime stays the same. Im not worried about the session expiring, im worried about the cookie expiring. Thanks for your suggestion though. Tim

On Thu, Nov 27, 2008 at 14:15, Kevin McArthur <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    You just need to call setExpirationSeconds again.




    Tim Nagel wrote:

        Hello,
         I am trying to set sessions to be remembered for 2 weeks. I
        have set remember_me_seconds to 1209600. I call
        Zend_Session::rememberMe() once the user is authenticated.
         Works great.
         The problem occurs that the cookie expiry time is never
        updated after this point and will expire in 2 weeks regardless
        of how much activity. I want to be able to extend this to
        current activity + 2 weeks, but using
        Zend_Session::rememberMe() in the bootstrap calls
        regenerateId() and changes the session id on every pageload
        which will break some code I am using that needs a steady
        session id.
         The question is: IS there a way to call rememberMe() without
        it calling regenerateId(), should I request a new feature? I
        know I can override the session object to do what I want
        without too much trouble, but I believe I might be missing
        something in my application design? How do you guys deal with
        remembering sessions?
           Tim


--
    Kevin McArthur

    StormTide Digital Studios Inc.
    Author of the recently published book, "Pro PHP"
    http://www.stormtide.ca <http://www.stormtide.ca/>



--

Kevin McArthur

StormTide Digital Studios Inc.
Author of the recently published book, "Pro PHP"
http://www.stormtide.ca

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to