diff --git a/config.php-dist b/config.php-dist index 17b2ed53f..8baf4b76c 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 36a982f7c..42877ffec 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"); }