1

I just use database session with kohana3.2,and set the config file:

    'database' => array(
    'name' => 'session_name',
    'encrypted' => TRUE,
    'lifetime' => 24 * 3600,
    'group' => 'write',
    'table' => 'sessions',
    'columns' => array(
        'session_id'  => 'session_id',
        'last_active' => 'last_active',
        'contents'    => 'contents'
    ),
    'gc' => 500,
),

But I got error:

Session_Exception [ 1 ]: Error reading session data.SYSPATH\classes\kohana\session.php [ 326 ]

I searched about this,but failed to find out a solution.Has anyone tried database session?

Thanks!

update:

All application config need to be placed in application/config/session.php,so I am wrong,sorry.Both system and modules config shouldnt be modified.

Community
  • 1
  • 1
Timyes
  • 11
  • 4

1 Answers1

0

Did you resolve this? I had a similar issue and it was because I needed to set-up the sessions schema:

http://kohanaframework.org/3.2/guide/api/Session_Database

CREATE TABLE  `sessions` (
    `session_id` VARCHAR( 24 ) NOT NULL,
    `last_active` INT UNSIGNED NOT NULL,
    `contents` TEXT NOT NULL,
    PRIMARY KEY ( `session_id` ),
INDEX ( `last_active` )
) ENGINE = MYISAM ;
xylar
  • 7,433
  • 17
  • 55
  • 100