Testing PHP7.2 - Internal Server Error session_set_save_handler(): Cannot change save handler when session is active

675 views
Skip to first unread message

Ysguy

unread,
Jun 22, 2018, 8:39:28 PM6/22/18
to Fat-Free Framework
Hi, I just tried my site with PHP7.2 instead of PHP7.0 and I immediately get the following error - Any ideas, i'm using the stock DB sessions code for F3. I searched and can't find any other posts. Seems to be a common PHP7.3 issue when google searching. 

Internal Server Error

session_set_save_handler(): Cannot change save handler when session is active

[lib/base.php:2190] Base->error()
[lib/session.php:180] session_set_save_handler()
[api/v1/login/template.php:2] Session->__construct()
[lib/base.php:2733] require()
[lib/base.php:2757] View->sandbox()
[index.php:68] View->render()
[lib/base.php:1806] {closure}()
[lib/base.php:1627] Base->call()
[index.php:223] Base->run()

I start my sessions like this

$sess=new DB\SQL\Session($db);


ikkez

unread,
Jun 22, 2018, 8:49:53 PM6/22/18
to Fat-Free Framework
is this version 3.6.4?

Ysguy

unread,
Jun 22, 2018, 8:55:22 PM6/22/18
to Fat-Free Framework
3.6.3 

Ysguy

unread,
Jun 22, 2018, 8:56:45 PM6/22/18
to Fat-Free Framework

Ahh i see its fixed in the 3.6.4 changelog. I'll update tomorrow and try. Thanks!

Ysguy

unread,
Jun 24, 2018, 1:11:09 PM6/24/18
to Fat-Free Framework
Upgraded my lib folder to latest version 3.6.4 same issue as before. 

php -v


PHP
7.2.7-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jun 22 2018 08:44:50) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
   
with Zend OPcache v7.2.7-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

apache2ctl -v

Server version: Apache/2.4.18 (Ubuntu)
Server built:   2018-04-18T14:53:04



php.ini changes - increased post max, max_execution_time and memory_limit.as i usually do.

ikkez

unread,
Jun 25, 2018, 1:20:29 AM6/25/18
to Fat-Free Framework
well the only thing we can do to work around this issue, is to disable DB\SQL\Session in case a session is already active
The question is, where did you place
$sess=new DB\SQL\Session($db);

and have you used / accessed the SESSION var anywhere before you init the sql session? Because this would cause this issue.


Reply all
Reply to author
Forward
0 new messages