PHP 7.2 && composer && F3 3.6.3 => session_cache_limiter(): Cannot change cache limiter when session is active

266 views
Skip to first unread message

Diego Cano Lagneaux

unread,
Jan 11, 2018, 7:39:53 AM1/11/18
to Fat-Free Framework
I've updated my testing server to PHP 7.2 and now all my F3 projects give me this answer: 

     session_cache_limiter(): Cannot change cache limiter when session is active

Now, I've searched the group and found one other person with this issue, but they did "session_start()" before calling F3. I don't.

What I do is call F3 via composer. I've tried a minimal example with the following steps:

1. Create empty directory
2. Call "composer require bcosca/fatfree"
3. Create an 'index.php' with the contents:
<?php
   require_once
('vendor/autoload.php');
   $f3
= \Base::instance();
   $f3
->route("/",function() { echo "Hello world"; });
   $f3
->run();

Same error. I understand that not everyone uses Composer with Fatfree, but it's quite convenient and I would like to keep being able to use it. Moreover, I can not find any reference to "session" but inside the faftree code.

What can I do?

ikkez

unread,
Jan 11, 2018, 8:30:08 AM1/11/18
to Fat-Free Framework
This could be an upstream bug in php, but it already files as issue here https://github.com/bcosca/fatfree-core/issues/238 and there's already a pending patch for the framework.. but that PR still needs some adjustments.

Diego Cano Lagneaux

unread,
Jan 11, 2018, 8:33:23 AM1/11/18
to Fat-Free Framework


El jueves, 11 de enero de 2018, 14:30:08 (UTC+1), ikkez escribió:
This could be an upstream bug in php, but it already files as issue here https://github.com/bcosca/fatfree-core/issues/238 and there's already a pending patch for the framework.. but that PR still needs some adjustments.

Thanks. I checked the bcosca/fatfree tracker but forgot about fatfree-core. Sorry about that.

Nuwanda

unread,
Jan 11, 2018, 2:16:20 PM1/11/18
to Fat-Free Framework
Is your session.auto_start set to on?

Diego Cano Lagneaux

unread,
Jan 11, 2018, 5:05:59 PM1/11/18
to Fat-Free Framework

El jueves, 11 de enero de 2018, 20:16:20 (UTC+1), Nuwanda escribió:
Is your session.auto_start set to on?

It was! I must have changed it years ago and completely forget about it. Thanks. 

Nuwanda

unread,
Jan 11, 2018, 9:39:38 PM1/11/18
to f3-fra...@googlegroups.com
No worries. You just have to remember not to start your session after loading F3, which is no big deal but it's a gotcha.



Reply all
Reply to author
Forward
0 new messages