From 268dfc987664416db099761d51a5c007eb926904 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 28 May 2024 21:03:16 -0400 Subject: fix date --- src/web/index.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/web/index.php') diff --git a/src/web/index.php b/src/web/index.php index e032ef2..75c1b62 100644 --- a/src/web/index.php +++ b/src/web/index.php @@ -19,14 +19,19 @@ require($webroot . '/core/loader.php'); require($webroot . '/core/router.php'); session_save_path('/var/lib/php/session'); -session_set_cookie_params( - 60 * 60 * 24 * 365, // lifetime (seconds), - '/', // path - NULL, // domain, - FALSE, // secure, - FALSE // http only -); session_start(); +setcookie( + session_name(), + session_id(), + array( + 'expires' => time() + 60*60*24*7, + 'path' => '/', + 'domain' => NULL, + 'secure' => FALSE, + 'httponly' => FALSE, + 'samesite' => 'Lax' + ) +); function __init() { $load = new Loader(); -- cgit v1.2.3-freya