Kohana3 会话数据库:读取会话数据时出错
我只是使用 kohana3.2 的数据库会话,并设置配置文件:
'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,
),
但我收到错误:
Session_Exception [ 1 ]: Error reading session data.SYSPATH\classes\kohana\session.php [ 326 ]
我搜索了这个,但未能找到解决方案。有人尝试过数据库会话吗?
谢谢!
更新:
所有应用程序配置都需要放在application/config/session.php中,所以我错了,抱歉。系统和模块配置都不应该修改。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你解决这个问题了吗?我遇到了类似的问题,这是因为我需要设置会话架构:
http:// kohanaframework.org/3.2/guide/api/Session_Database
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