osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Admin time out revisited..

This is a discussion on Admin time out revisited.. within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; It makes me crazy to have to log into the admin time after time all day long.. done my research ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 08-27-2007, 07:04 PM
wkdwich's Avatar
New Member
 
Join Date: Jul 2007
Posts: 25
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
wkdwich is on a distinguished road
Default Admin time out revisited..

It makes me crazy to have to log into the admin time after time all day long.. done my research and found this thread:
Need help with session timeouts

which says to edit the sess_life settings in both the sessions.php (includes/functions & admin/includes/functions)

oops sorry that didnt help me at all..

I run 1 instance of oscMAX on my server & 2 original osc installations, one highly modified..

I have to re-log into the max and not highly modified admins, the highly modified admin I do not have to relog in unless I compeletely shut down all instances of MSIE.

There is only 1 php.ini on the entire server, it is set to:
session.gc_maxlifetime = 1440
(meaning to say that the domain running the highly modified osc does not have it's own php.ini

All 3 conf files use mysql for the store sessions..


has anyone got any ideas?? thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 08-27-2007, 08:50 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,535
Thanks: 76
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Admin time out revisited..

The post you reference is not for the admin panel, but only for the catalog.

This is a post for the admin panel:
Timeout for Admin-NOW I'm mad!
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 08-27-2007, 09:53 PM
wkdwich's Avatar
New Member
 
Join Date: Jul 2007
Posts: 25
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
wkdwich is on a distinguished road
Default Re: Admin time out revisited..

Michael, thanks I saw that one also and read the pertanent parts twice, but I guess I was so fixated on changing the 1440 to 3600 that I didnt see there was also a line removed there.. will test that out in the AM.. thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 08-28-2007, 09:52 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,535
Thanks: 76
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Admin time out revisited..

Also be sure you delete all the cookies for your site after you make the change.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 08-28-2007, 07:11 PM
wkdwich's Avatar
New Member
 
Join Date: Jul 2007
Posts: 25
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
wkdwich is on a distinguished road
Default Re: Admin time out revisited..

Michael, your time is much appreciated.. I was hoever unsucessfull

from the admin edit post you references I did as instructed:
PHP Code:
if (STORE_SESSIONS == 'mysql') {
if (!
$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
$SESS_LIFE = 1440;
}

to this


PHP Code:
if (STORE_SESSIONS == 'mysql') {
$SESS_LIFE = 3600;
}


only to get an error code on line 63
Parse error: syntax error, unexpected '}' in /home/wkdwich/public_html/shoppe/admin/includes/functions/sessions.php on line 63

Code:
<?php
/*
$Id: sessions.php 3 2006-05-27 04:59:07Z user $
  osCMax Power E-Commerce
  osCommerce Documentation by OSCdox :: osCommerce and osCMax documentation
  Copyright 2006 osCMax
  Released under the GNU General Public License
*/
 if (STORE_SESSIONS == 'mysql') {
         $SESS_LIFE = 3600;
    }  
    function _sess_open($save_path, $session_name) {
      return true;
    }
    function _sess_close() {
      return true;
    }
    function _sess_read($key) {
      $qid = tep_db_query("select value from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "' and expiry > '" . time() . "'");
      $value = tep_db_fetch_array($qid);
      if ($value['value']) {
        return $value['value'];
      }
      return false;
    }
    function _sess_write($key, $val) {
      global $SESS_LIFE;
      $expiry = time() + $SESS_LIFE;
      $value = $val;
      $qid = tep_db_query("select count(*) as total from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'");
      $total = tep_db_fetch_array($qid);
      if ($total['total'] > 0) {
        return tep_db_query("update " . TABLE_SESSIONS . " set expiry = '" . tep_db_input($expiry) . "', value = '" . tep_db_input($value) . "' where sesskey = '" . tep_db_input($key) . "'");
      } else {
        return tep_db_query("insert into " . TABLE_SESSIONS . " values ('" . tep_db_input($key) . "', '" . tep_db_input($expiry) . "', '" . tep_db_input($value) . "')");
      }
    }
    function _sess_destroy($key) {
      return tep_db_query("delete from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'");
    }
    function _sess_gc($maxlifetime) {
      tep_db_query("delete from " . TABLE_SESSIONS . " where expiry < '" . time() . "'");
      return true;
    }
    session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
  }
  function tep_session_start() {
    return session_start();
  }
  function tep_session_register($variable) {
    return session_register($variable);
  }
  function tep_session_is_registered($variable) {
    return session_is_registered($variable);
  }
  function tep_session_unregister($variable) {
    return session_unregister($variable);
  }
  function tep_session_id($sessid = '') {
    if ($sessid != '') {
      return session_id($sessid);
    } else {
      return session_id();
    }
  }
  function tep_session_name($name = '') {
    if ($name != '') {
      return session_name($name);
    } else {
      return session_name();
    }
  }
  function tep_session_close() {
    if (function_exists('session_close')) {
      return session_close();
    }
  }
  function tep_session_destroy() {
    return session_destroy();
  }
  function tep_session_save_path($path = '') {
    if ($path != '') {
      return session_save_path($path);
    } else {
      return session_save_path();
    }
  }
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 08-28-2007, 07:23 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,535
Thanks: 76
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Admin time out revisited..

The remaining code should be this:

PHP Code:
if (STORE_SESSIONS == 'mysql') {
 
$SESS_LIFE 3600
Lose the extra } at the end...

Also note that you have to store your sessions in mysql database not as files...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 08-29-2007, 05:41 AM
wkdwich's Avatar
New Member
 
Join Date: Jul 2007
Posts: 25
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
wkdwich is on a distinguished road
Default Re: Admin time out revisited..

good golly Miss Molly.. that worked now thanks so much Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 08-29-2007, 03:56 PM
osCMax Testing Team
 
Join Date: Dec 2005
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
c.h.u.d.
Default Re: Admin time out revisited..

Of course it worked, you just had to wrap your head around it first.

I have used this method many times.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 08-29-2007, 09:17 PM
wkdwich's Avatar
New Member
 
Join Date: Jul 2007
Posts: 25
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
wkdwich is on a distinguished road
Default Re: Admin time out revisited..

hahah yup.. "contrary to popular belief my head has always been right here on my shoulders.. it only appears it is in another location most days"

I am sure if I looked at the code long enough I would have seen that one bracket should have been trashed.. I can't write but I can manipulate most times..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
First time posting hi all i need help kobiadato osCMax v2 Features Discussion 3 04-02-2006 08:29 PM
Another one from me... (css this time) [wicked] osCMax v2 Customization/Mods 2 02-07-2006 04:06 PM
So Many Queries so little time delphi1 osCMax v2 Customization/Mods 10 11-07-2005 04:02 AM
Extending Admin login expiry time NickW osCMax v1.7 Discussion 5 06-28-2004 08:36 AM
Third time I'm installing now and getting p***** of.. ChanBe osCommerce 2.2 Installation Help 4 08-28-2003 06:29 AM


All times are GMT -8. The time now is 06:26 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax