
Originally Posted by
macbookpro
Hello everyone!
I am using Zen Cart 1.5.3 and am having issues extending my customer session length. I have tried a few things including adding php_value session.gc_maxlifetime 86400 to my root .htaccess
Why so long? As a general rule 15mins is plenty long enough to assume that the customer has left the store.

Originally Posted by
macbookpro
have also tried editing the $SESS_LIFE = 1440; variable in sessions.php.
The $SESS_LIFE variable can be set in several places of the sessions.php file. Are you setting the right one in the right place?
Also, while looking at this code I noted that one of these places is supposed to be via a define('SESSION_TIMEOUT_CATALOG') setting, but I can't seem to find this setting in my database or any of the file defines. I don't know if this is 'normal' or not.
I suggest you perform a DB and file search on your site to see if you can find this constant and define it to your needs.

Originally Posted by
macbookpro
My session.gc_maxlifetime local and master stay set at 900 and 1400 respectively no matter what I try. I am not sure if those numbers should change
The master will probably never change as this is a server configuration setting.
The local will change dependant on whatever you have changed it too. If you are unable to get it to change it suggests that you need to configure it elsewhere or in a different manner. I suspect that placing it in the .htaccess file may work with some servers but not others.

Originally Posted by
macbookpro
but regardless, my session times out after the 15 min my local is set to. I have recently tried installing keepcart and although it appears to have installed successfully, my session still times out.
I don't know anything about 'keep cart', but if a logged in customer has contents in their cart and they get logged out, those contents will be restored to their cart when they next log in. There really isn't any need (that I'm aware of) for a customer Session to time out any longer than 15minutes.
This 15minutes doesn't limit the time a customer can spend browsing the site. It simply means they'll be automatically logged out after 15minutes of inactivity.
If you want a 'dirty' fix.
In sessions.php find
Code:
if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
$SESS_LIFE = 1440 ;
}
Replace with
Code:
// if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
$SESS_LIFE = 86400 ;
// }
I make no guarantee that this will work. There are probably a dozen better ways of doing this. I make this proposal as 'a proof of concept' rather than a real solution.
It might just achieve what you are asking for though.
Cheers
RodG