Permalink
Browse files

Change the default session serialize_handler to php_serialize Fixes #…

…4444 (#4464)

* Change the default session serialize_handler to php_serialize

by keeping run able on php 5.4
Signed-off-by: albertlast albertlast@hotmail.de

* less space

Signed-off-by: albertlast albertlast@hotmail.de

* add space

Signed-off-by: albertlast albertlast@hotmail.de
  • Loading branch information...
albertlast authored and colinschoen committed Jan 2, 2018
1 parent 6c48351 commit db4ee69624e40c1b83c518d2a5b91e0009fa70d9
Showing with 3 additions and 1 deletion.
  1. +3 −1 Sources/Session.php
@@ -62,7 +62,9 @@ function loadSession()
// Use database sessions? (they don't work in 4.1.x!)
if (!empty($modSettings['databaseSession_enable']))
{
@ini_set('session.serialize_handler', 'php');
@ini_set('session.serialize_handler', 'php_serialize');
if (ini_get('session.serialize_handler') != 'php_serialize')
@ini_set('session.serialize_handler', 'php');
session_set_save_handler('sessionOpen', 'sessionClose', 'sessionRead', 'sessionWrite', 'sessionDestroy', 'sessionGC');
@ini_set('session.gc_probability', '1');
}

0 comments on commit db4ee69

Please sign in to comment.