Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatic Log Off of User for Inactivity


Guest

Recommended Posts

What is the default time limit for inactivity before the user is automatically logged off the store, and can that limit be modified (extended)?

Link to comment
Share on other sites

Russ,

 

 

Edit this code in the /admin/includes/functions/sessions.php file:

 

 

if (STORE_SESSIONS == 'mysql') {

if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {

$SESS_LIFE = 1440;

}

 

 

 

Chris

Link to comment
Share on other sites

if (STORE_SESSIONS == 'mysql') {

if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {

$SESS_LIFE = 1440;

}

relace with

 

if (STORE_SESSIONS == 'mysql') {

if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {

$SESS_LIFE = 2880; // doubled time

}

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

You may have to edit your php.ini or ask your host about "session.gc_maxlifetime". I believe the php default is 1440 and I don't think OSC will override that. I could be wrong on that point.

Link to comment
Share on other sites

As session is stored in data base so osc will override it.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Thanks, guys, for your help! This is what I did to get the results I wanted:

----------------------------------

if (STORE_SESSIONS == 'mysql') {

#if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {

$SESS_LIFE = 14400;

#}

----------------------------------

 

I found that by reming out the if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) { line I can force the session life value to whatever I choose -- a very high number in this case so users can view a very long live webcast (up to 4 hours) without being forced to re-login afterwards.

 

 

Russ

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...