SESSION_COOKIE_LIFETIME

master
Andrew Dolgov 19 years ago
parent 04febb0429
commit 686c3ccfa6

@ -107,5 +107,8 @@
define('SESSION_CHECK_ADDRESS', true); define('SESSION_CHECK_ADDRESS', true);
// Bind sessions to specific IP address (requires DATABASE_BACKED_SESSIONS) // 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 // vim:ft=php
?> ?>

@ -107,6 +107,8 @@
db_query($session_connection, $query); db_query($session_connection, $query);
} }
session_set_cookie_params(SESSION_COOKIE_LIFETIME);
if (DATABASE_BACKED_SESSIONS) { if (DATABASE_BACKED_SESSIONS) {
session_set_save_handler("open", "close", "read", "write", "destroy", "gc"); session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
} }

Loading…
Cancel
Save