mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-06 16:53:34 +02:00
fixes #512, set session garbage collector probability
This commit is contained in:
@@ -103,6 +103,12 @@ if(isset($conf['show_php_errors']) && !empty($conf['show_php_errors']))
|
||||
@ini_set('display_errors', true);
|
||||
}
|
||||
|
||||
if ($conf['session_gc_probability'] > 0)
|
||||
{
|
||||
@ini_set('session.gc_divisor', 100);
|
||||
@ini_set('session.gc_probability', min((int)$conf['session_gc_probability'], 100));
|
||||
}
|
||||
|
||||
include(PHPWG_ROOT_PATH . 'include/constants.php');
|
||||
include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
|
||||
include(PHPWG_ROOT_PATH . 'include/template.class.php');
|
||||
|
||||
@@ -422,6 +422,12 @@ $conf['session_length'] = 3600;
|
||||
// address
|
||||
$conf['session_use_ip_address'] = true;
|
||||
|
||||
// Probability, on each page generated, to launch session garbage
|
||||
// collector. Integer value between 1 and 100, in %. 0 to disable and let
|
||||
// the system default behavior (on Debian-like, it's "never delete
|
||||
// session").
|
||||
$conf['session_gc_probability'] = 1;
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | debug/performance |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user