CI 4.1.8 session issues |
Hi guys,
I have weird issue with CI4 session. Every 2nd page reload throws ErrorException - session_start(): Failed to decode session object. Session has been destroyed - i did upgrade to CI 4.1.8 - i use Myth:auth, but even if just refresh homepage without login - if i login, i land in dashboard - OK, F5 and session is gone Config/App.php PHP Code: public $sessionDriver = 'CodeIgniter\Session\Handlers\DatabaseHandler'; Created MySQL 'ci_sessions' table from userguide: https://codeigniter4.github.io/userguide/libraries/sessions.html Code: CREATE TABLE IF NOT EXISTS `ci_sessions` ( PHP 7.4.27 php.ini Code: session.auto_start Off Off This session setup always has worked. Can anyone tell what config options i need to change? Server variables? Maybe some hidden stuff in Myth:auth module? What setup does work for you?
3 days later...
Cause of the problem was that CI session could not be written into database. Simply session was too big, therefore on the next reload it could not be read. https://codeigniter.com/user_guide/libra...ler-driver When creating a `ci_sessions` table, use `mediumblob` instead of `blob` blob - 65,535 bytes mediumblob - 16,777,215 bytes |
Welcome Guest, Not a member yet? Register Sign In |