mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Issue #4520 Possible fix for session duration. (testing needed)
This commit is contained in:
@@ -1505,7 +1505,7 @@ $text .= "
|
|||||||
<tr>
|
<tr>
|
||||||
<td><label for='session-lifetime'>".PRFLAN_272."</label>".$frm->help(PRFLAN_273)."</td>
|
<td><label for='session-lifetime'>".PRFLAN_272."</label>".$frm->help(PRFLAN_273)."</td>
|
||||||
<td>
|
<td>
|
||||||
".$frm->number('session_lifetime', varset($pref['session_lifetime']), 6)."
|
".$frm->number('session_lifetime', varset($pref['session_lifetime']), 86400)."
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
|
@@ -216,7 +216,7 @@ class e_session
|
|||||||
|
|
||||||
$config['SavePath'] = e107::getPref('session_save_path', false); // FIXME - new pref
|
$config['SavePath'] = e107::getPref('session_save_path', false); // FIXME - new pref
|
||||||
$config['SaveMethod'] = e107::getPref('session_save_method', $saveMethod);
|
$config['SaveMethod'] = e107::getPref('session_save_method', $saveMethod);
|
||||||
$options['lifetime'] = (integer)e107::getPref('session_lifetime', 86400);
|
$options['lifetime'] = (int) e107::getPref('session_lifetime', 86400);
|
||||||
$options['path'] = e107::getPref('session_cookie_path', ''); // FIXME - new pref
|
$options['path'] = e107::getPref('session_cookie_path', ''); // FIXME - new pref
|
||||||
$options['secure'] = e107::getPref('ssl_enabled', false); //
|
$options['secure'] = e107::getPref('ssl_enabled', false); //
|
||||||
|
|
||||||
@@ -226,6 +226,8 @@ class e_session
|
|||||||
{
|
{
|
||||||
ini_set('session.cookie_secure', 1);
|
ini_set('session.cookie_secure', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ini_set('session.gc_maxlifetime', $options['lifetime']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined('SESSION_SAVE_PATH')) // safer than a pref.
|
if (defined('SESSION_SAVE_PATH')) // safer than a pref.
|
||||||
|
Reference in New Issue
Block a user