Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Where do I set the timelimit for the


Zuncan

Recommended Posts

Hi!

 

Just wondering what file I set the timelimit for the sessions. I mean how long it takes for the session to disappear if the user is inactive.

 

/Zuncan

So what?! Who care in a hundred years anyway?

Link to comment
Share on other sites

Open up includes/functions/sessions.php and edit this line:

 

if (STORE_SESSIONS == 'mysql') {
   if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
     $SESS_LIFE = 1440;
   }

 

The above example means that the session will last 1440 seconds.

Link to comment
Share on other sites

You should also know that, unfortunately, this setting is usually set to 1440 by default on most Linux/Apache servers. The default server value will override anything you set in sessions.php :(

Link to comment
Share on other sites

You should also know that, unfortunately, this setting is usually set to 1440 by default on most Linux/Apache servers. The default server value will override anything you set in sessions.php  :(

 

Really didnt know that, do you know how to change the default on the server?

Link to comment
Share on other sites

The admin for your server would need to change it. Unfortunately, most web hosts won't go monkeying with the server settings just because one client requests it. So usually you're stuck with the current setting :(

 

You can see what your server's setting is using the Tools->Server Info link in Oscommerce. It's listed under the "Session" header.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...