From 686c3ccfa6060be0b3ed2a634709bb7eff702f50 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 2 Mar 2006 17:21:08 +0100 Subject: [PATCH] SESSION_COOKIE_LIFETIME --- config.php-dist | 3 +++ sessions.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/config.php-dist b/config.php-dist index 17b2ed53..8baf4b76 100644 --- a/config.php-dist +++ b/config.php-dist @@ -107,5 +107,8 @@ define('SESSION_CHECK_ADDRESS', true); // Bind sessions to specific IP address (requires DATABASE_BACKED_SESSIONS) + define('SESSION_COOKIE_LIFETIME', 3600); + // In seconds, 0 means delete on browser close + // vim:ft=php ?> diff --git a/sessions.php b/sessions.php index 36a982f7..42877ffe 100644 --- a/sessions.php +++ b/sessions.php @@ -107,6 +107,8 @@ db_query($session_connection, $query); } + session_set_cookie_params(SESSION_COOKIE_LIFETIME); + if (DATABASE_BACKED_SESSIONS) { session_set_save_handler("open", "close", "read", "write", "destroy", "gc"); }