SESSION_COOKIE_LIFETIME

This commit is contained in:
Andrew Dolgov 2006-03-02 17:21:08 +01:00
parent 04febb0429
commit 686c3ccfa6
2 changed files with 5 additions and 0 deletions

View File

@ -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
?>

View File

@ -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");
}