Adds memcached session setting for >=PHP7.0
authorAdam Bowling <abowling@emeralddata.net>
Tue, 2 Jan 2018 18:32:21 +0000 (13:32 -0500)
committerAdam Bowling <abowling@emeralddata.net>
Tue, 2 Jan 2018 18:32:21 +0000 (13:32 -0500)
Signed-off-by: Adam Bowling <abowling@emeralddata.net>
models/session.class.php

index a378251..107f3fd 100644 (file)
@@ -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
+?>