Not sure if F3 bug or not

125 views
Skip to first unread message

Matt Dean

unread,
Nov 21, 2018, 9:54:59 AM11/21/18
to Fat-Free Framework
Since upgrading to PHP7.2 I'm getting the following error
Warning: session_set_save_handler(): Cannot change save handler when session is active in D:\website\vendor\bcosca\fatfree\lib\db\sql\session.php on line 202

ved

unread,
Nov 21, 2018, 10:22:03 AM11/21/18
to Fat-Free Framework
I'm pretty sure this issue was already fixed. Please upgrade.

Matt Dean

unread,
Nov 21, 2018, 10:48:38 AM11/21/18
to Fat-Free Framework
Not sure if this is the same. 
I'm running  3.6.4

ved

unread,
Nov 21, 2018, 11:39:36 AM11/21/18
to Fat-Free Framework
Oops, you're right, it appears to be a similar issue so I read that completely wrong.

Can you provide more details about the issue?
When does this happen?
Have you tried using another session handler instead of the SQL one?
Was it working before?
What PHP version was there before?
Any changes to the php.ini?
Etc, etc, and any relevant info that you can provide.

Matt Dean

unread,
Nov 23, 2018, 9:44:23 AM11/23/18
to Fat-Free Framework
Hi Ved,

So the upgrade from php 7.0 to 7.2 is when it started, it was working fine before.
It appears to be happening during my bootstrap in my db helper when it calls 
new \DB\SQL\Session($db, 'sessions', TRUE, function(){return true;});
php.ini is pretty standard

Matt Dean

unread,
Nov 23, 2018, 10:09:28 AM11/23/18
to Fat-Free Framework
Also if I wrap session_set_save_handler( on line 192 in sessions.php with
if (!headers_sent() && session_status()!=PHP_SESSION_ACTIVE) {}
it seems to work ok.

ikkez

unread,
Nov 23, 2018, 10:36:38 AM11/23/18
to Fat-Free Framework
test the fatfree-core dev version.. i think it already has it patched

Matt Dean

unread,
Nov 23, 2018, 10:45:42 AM11/23/18
to Fat-Free Framework
Tested, same issue

ikkez

unread,
Nov 23, 2018, 7:20:23 PM11/23/18
to f3-fra...@googlegroups.com
well then you're probably using it wrong. when you add that condition, you basically skip initialising the whole sql session handler, as this is what session_set_save_handler is doing.. make sure you're not using any other active session before initialising the sql session handler.

Matt Dean

unread,
Nov 26, 2018, 11:09:34 AM11/26/18
to Fat-Free Framework
Turns out another dev had left a session_start in from some testing. Doh!
Reply all
Reply to author
Forward
0 new messages