From 831e84b91882223e919a8763cee26710119ac770 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 4 Jul 2009 06:22:03 +0000 Subject: - Patch #72856 by quicksketch: on some systems, PHP's garbage collector is disabled so make sure to enable it. --- sites/default/default.settings.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sites/default/default.settings.php') diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index f831649aa..9434dd28a 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -194,7 +194,18 @@ $update_free_access = FALSE; * See drupal_initialize_variables() in includes/bootstrap.inc for required * runtime settings and the .htaccess file for non-runtime settings. Settings * defined there should not be duplicated here so as to avoid conflict issues. - * + */ + +/** + * Some distributions of Linux (most notably Debian) ship their PHP + * installations with garbage collection (gc) disabled. Since Drupal depends on + * PHP's garbage collection for clearing sessions, ensure that garbage + * collection occurs by using the most common settings. + */ +ini_set('session.gc_probability', 1); +ini_set('session.gc_divisor', 100); + +/** * Set session lifetime (in seconds), i.e. the time from the user's last visit * to the active session may be deleted by the session garbage collector. When * a session is deleted, authenticated users are logged out, and the contents -- cgit v1.2.3