coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: studeo on January 02, 2007, 05:40:28 PM

Title: expiring login cookies
Post by: studeo on January 02, 2007, 05:40:28 PM
The cookies for members of my site (including me) seem to expire every 2-3 weeks whereas I/they have to login again. Why does this do that? Anybody?

Thanks
Title: Re: expiring login cookies
Post by: Nibbler on January 02, 2007, 06:18:53 PM
Session cookies are set to expire after 2 weeks. I don't know why.

bridge/coppermine.inc.php


                // set the session cookie
                setcookie( $this->client_id, $this->session_id, time() + (CPG_WEEK*2), $CONFIG['cookie_path'] );


Set the expiry time to whatever you see fit.
Title: Re: expiring login cookies
Post by: studeo on January 02, 2007, 06:56:06 PM
Thank you.  Any need to change this line in the same file:

// Lifetime of 'remember me' session is 2 weeks
                $rememberme_life_time = time()-(CPG_WEEK*2);
Title: Re: expiring login cookies
Post by: studeo on January 02, 2007, 06:59:59 PM
What if I never want it to expire?
Title: Re: expiring login cookies
Post by: Nibbler on January 02, 2007, 07:05:13 PM
Yeah, you should change that line to match. If you don't want sessions to expire just set a high value like a few years.