osCmax v2.5 User Manual
Results 1 to 9 of 9

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 ...

      
  1. #1
    osCMax Testing Team wkdwich's Avatar
    Join Date
    Jul 2007
    Posts
    307
    Rep Power
    11


    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

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    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 Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    osCMax Testing Team wkdwich's Avatar
    Join Date
    Jul 2007
    Posts
    307
    Rep Power
    11


    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

  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    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 Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  5. #5
    osCMax Testing Team wkdwich's Avatar
    Join Date
    Jul 2007
    Posts
    307
    Rep Power
    11


    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();
        }
      }
    ?>

  6. #6
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    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 Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  7. #7
    osCMax Testing Team wkdwich's Avatar
    Join Date
    Jul 2007
    Posts
    307
    Rep Power
    11


    Default Re: Admin time out revisited..

    good golly Miss Molly.. that worked now thanks so much Michael

  8. #8
    Member
    Join Date
    Dec 2005
    Posts
    30
    Rep Power
    0


    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.

  9. #9
    osCMax Testing Team wkdwich's Avatar
    Join Date
    Jul 2007
    Posts
    307
    Rep Power
    11


    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..

Similar Threads

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •