mysql - CakePHP 2: Not writing session data to database -
is there reason why cakephp 2 project won't write session data database (mysql)?
as per instructions here i've created cake_sessions
table in db using:
create table `cake_sessions` ( `id` varchar(255) not null default '', `data` text, `expires` int(11) default null, primary key (`id`) );
i've modified core.php
reflect following:
configure::write( 'session', [ 'defaults' => 'php', // modify session timeout 'timeout' => 1440, 'cookietimeout' => 1440, 'checkagent' => false, 'autoregenerate' => true, ] );
however, attempting load pages produces session errors (failed read session data) , no data written db.
i've carried out similar steps in cakephp 3 projects , works out of box.
thanks.
resolved.
my version of cake 2.8 , upgrading 2.10.1 fixed issue. best guess db sessions wasn’t implemented in 2.8!
Comments
Post a Comment