Open tohizma opened 11 months ago
I'm not sure what the cause is but the solution I found so far is not to call new Session(); and set session.auto_start = 1 in php.ini. php will auto start sessions and you can still use normal $f3->get calls on sessions as usual, something changed in php versions and f3 has yet to catch up the session is constantly lost, I've tried memcached, db based and file based sessions they all get lost.
Found solution, maybe variable assignment is backward. Temporary Fix on base.php line 575
function sync(string $key): ?array
{
//return $GLOBALS['_'.$key] = &$this->_hive_data[$key]; // original code
return $this->_hive_data[$key] = &$GLOBALS['_'.$key]; // flip hive assignment
}
Not found any side effects yet
Session doesn't passed between pages/routes. Simple test case:
Result is:
Chrome Inspect shows that session is correct (match with sending page)
Tested using form post and ajax post request.
Environment: PHP Version 8.2.10 F3 version 4 dev
If same code tested using version 3.8 works normally