Mobile-Menu iFuturz Infoweb Inc. Contact Portfolio

17

Sep

How to increase or decrease session time out to oscommerce 2.3 ?

How to increase or decrease session time out to oscommerce 2.3 ?

Posted On : September 17, 2013

| 3 Comments

By default session time out has 1440 seconds (24 minutes ) in oscommerce 2.3 .Following way we can increase or decrease session time out .

In configure.php session must be stored in mysql and file located on includes/configure.php

define('STORE_SESSIONS', 'mysql');

See Following file /Catalog/includes/functions/sessions.php

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

If you do not want to change session time out globally by php.ini then edit sessions.php

See Following file /Catalog/includes/functions/sessions.php

Remove or comment out the if condition to above file and edit $SESS_LIFE value from 1440 to 2400 .see below code

if (STORE_SESSIONS == 'mysql') {
   // if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
        $SESS_LIFE = 2400;
   // }
//--------- More code... -----------
}

Now Save that file and Close browser. Check store session will expire after 2400 seconds

In Oscommerce front and admin session files are located two difference path. So developer can control or manage separately

Front Path : /Catalog/includes/functions/sessions.php

Admin Path : /Catalog/admin/includes/functions/sessions.php

  • Tags:

Comment

Posts

  • Have you ever considered about including a little bit more than just your articles?
    I mean, what you say is fundamental and everything. However just imagine if you added some great graphics or video clips to give your posts more, “pop”! Your content is excellent but with images and video clips, this site could certainly be one of the very best in its niche.

    Katherine

    • Thanks for your suggestion Katherine, we are currently working on it and will let you know once we do it.

      iFuturz

  • Great website you’ve got here.. It’s difficult to get writing like yours nowadays.

    PhilLKeicher