From: kink Date: Mon, 30 Dec 2002 19:52:19 +0000 (+0000) Subject: Session naming in devel. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ebabf3f556ea49f05496e97d7cf82d7511ab6925;p=squirrelmail.git Session naming in devel. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4325 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/global.php b/functions/global.php index cead10a2..5bbfd796 100644 --- a/functions/global.php +++ b/functions/global.php @@ -13,6 +13,15 @@ * $Id$ */ +require_once(SM_PATH . 'config/config.php'); + +/* set the name of the session cookie */ +if(isset($session_name) && $session_name) { + ini_set('session.name' , $session_name); +} else { + ini_set('session.name' , 'SQMSESSID'); +} + /* If magic_quotes_runtime is on, SquirrelMail breaks in new and creative ways. * Force magic_quotes_runtime off. * chilts@birdbrained.org - I put it here in the hopes that all SM code includes this. diff --git a/include/validate.php b/include/validate.php index 41116656..f27fb33e 100644 --- a/include/validate.php +++ b/include/validate.php @@ -26,10 +26,19 @@ * ** Note this means that for the 1.3.2 release, we should probably * recommend that people set session.auto_start=0 to avoid this altogether. */ + session_write_close(); /* SquirrelMail required files. */ require_once(SM_PATH . 'class/mime.class.php'); +require_once(SM_PATH . 'config/config.php'); + +/* set the name of the session cookie */ +if(isset($session_name) && $session_name) { + ini_set('session.name' , $session_name); +} else { + ini_set('session.name' , 'SQMSESSID'); +} session_start(); @@ -80,7 +89,6 @@ global $theme; unset($theme); $theme=array(); -require_once(SM_PATH . 'config/config.php'); require_once(SM_PATH . 'include/load_prefs.php'); require_once(SM_PATH . 'functions/page_header.php'); require_once(SM_PATH . 'functions/prefs.php');