From 9ae9769f505242ad08cb2eaceef788c40b8308b8 Mon Sep 17 00:00:00 2001 From: Adam Bowling Date: Tue, 2 Jan 2018 13:32:21 -0500 Subject: [PATCH] Adds memcached session setting for >=PHP7.0 Signed-off-by: Adam Bowling --- models/session.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/models/session.class.php b/models/session.class.php index a378251..107f3fd 100644 --- a/models/session.class.php +++ b/models/session.class.php @@ -35,6 +35,13 @@ class session { $verID='3fca9f8aa945f04e090b258b2fcf10e4'; $sessionName = session_name(); $this->sessionCookieExists = isset($_COOKIE[$sessionName]) ? true : false; + + if (substr(phpversion(), 0, 1) == '7') { + //PHP7 workaround for memcache + include 'memcacheSession.class.php'; + $mcSession = new MemcachedSession(); + session_set_save_handler($mcSession, true); + } @session_start(); restore_error_handler(); @@ -105,4 +112,4 @@ class session { function __destruct() {} } -?> \ No newline at end of file +?> -- 2.11.0