diff --git a/public/include/config/global.inc.dist.php b/public/include/config/global.inc.dist.php index 6bc611d7..25667017 100644 --- a/public/include/config/global.inc.dist.php +++ b/public/include/config/global.inc.dist.php @@ -353,8 +353,7 @@ $config['memcache']['splay'] = 15; * * You can configure the cookie behaviour to secure your cookies more than the PHP defaults * - * For multiple installations of mmcfe-ng on the same domain you must change the cookie - * path or change the cookie name to avoid conflicts. + * For multiple installations of mmcfe-ng on the same domain you must change the cookie path. * * Explanation: * duration: @@ -384,14 +383,12 @@ $config['memcache']['splay'] = 15; * duration = '1440' * domain = '' * path = '/' - * name = 'POOLERCOOKIE' * httponly = true * secure = false **/ $config['cookie']['duration'] = '1440'; $config['cookie']['domain'] = ''; $config['cookie']['path'] = '/'; -$config['cookie']['name'] = 'POOLERCOOKIE'; $config['cookie']['httponly'] = true; $config['cookie']['secure'] = false; diff --git a/public/index.php b/public/index.php index b33c7556..ac7c4154 100644 --- a/public/index.php +++ b/public/index.php @@ -28,8 +28,9 @@ define("SECURITY", 1); if (!include_once(BASEPATH . 'include/config/global.inc.php')) die('Unable to load site configuration'); // Start a session -session_set_cookie_params($config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']); +session_set_cookie_params(time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']); session_start(); +setcookie(session_name(),session_id(),time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']); $session_id = session_id(); // Load Classes, they name defines the $ variable used