Fixed Session error in PHP 7.2.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 9 Apr 2018 07:52:03 +0000 (09:52 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 9 Apr 2018 07:52:03 +0000 (09:52 +0200)
includes/session.inc

index 3f8c525d32b80a2957642db34dbc036179a2badb..06aceccea2cf5620fe3f65cb8a8ec51092b9a935 100644 (file)
@@ -394,6 +394,9 @@ foreach ($installed_extensions as $ext)
        if (file_exists($path_to_root.'/'.$ext['path'].'/hooks.php'))
                include_once($path_to_root.'/'.$ext['path'].'/hooks.php');
 }
+
+ini_set('session.gc_maxlifetime', 36000); // moved from below.
+
 $Session_manager = new SessionManager();
 $Session_manager->sessionStart('FA'.md5(dirname(__FILE__)));
 
@@ -429,7 +432,7 @@ if ($SysPrefs->error_logfile != '') {
 */
 // ini_set('session.save_path', VARLIB_PATH.'/');
 
-ini_set('session.gc_maxlifetime', 36000); // 10hrs
+// ini_set('session.gc_maxlifetime', 36000); // 10hrs - moved to before session_manager
 
 hook_session_start(@$_POST["company_login_name"]);