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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| 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 |
| Sponsored Links | ||
| ||
|
#2
| ||||
| ||||
| 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
|
|
#3
| ||||
| ||||
| 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
| ||||
| ||||
| Also be sure you delete all the cookies for your site after you make the change.
__________________ Michael Sasek osCMax Developer
|
|
#5
| ||||
| ||||
| 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
| ||||
| ||||
| The remaining code should be this: PHP Code: Also note that you have to store your sessions in mysql database not as files...
__________________ Michael Sasek osCMax Developer
|
|
#7
| ||||
| ||||
| good golly Miss Molly.. that worked now |
|
#8
| |||
| |||
| Of course it worked, you just had to wrap your head around it first. I have used this method many times. |
|
#9
| ||||
| ||||
| 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.. |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| 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 |