From ddd9530d4e5795cad2e681f08c0023256d39c044 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Tue, 1 Dec 2009 15:43:55 +0000 Subject: [PATCH] Another session destroy but beter --- install/save.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/install/save.php b/install/save.php index acb8666b..d367cfc8 100644 --- a/install/save.php +++ b/install/save.php @@ -379,24 +379,12 @@ if (!$db) display_error("The configuration file $config_filename is not writable. Change its permissions so it is, then re-run step 4."); } } -/* + session_unset(); +session_regenerate_id(); session_destroy(); $_SESSION = array(); -*/ -session_start(); -$_SESSION = array(); -// If it's desired to kill the session, also delete the session cookie. -// Note: This will destroy the session, and not just the session data! -if (ini_get("session.use_cookies")) { - $params = session_get_cookie_params(); - setcookie(session_name(), '', time() - 42000, - $params["path"], $params["domain"], - $params["secure"], $params["httponly"] - ); -} -// Finally, destroy the session. -session_destroy(); + header("Location: ".$path_to_root."/index.php"); exit(); -- 2.30.2