Hi,

I'm trying to switch from file based session storage to a database but
I hit quite strange behavior. During the debugging I put the following
two statements in Zend_Session_SaveHandler_DbTable::write() method:

    public function write($id, $data)
    {
        $return = false;
        error_log('data: ' . $data);
        error_log('session: ' . print_r($_SESSION, true));

and the logs are confusing: first statement prints
'Zend_Auth|a:1:{s:7:"storage";O:21:"XXXXXXXXXXXX_UserInfo":7:{s:28:"'
 i.e *incomplete* serialized data but output from second (_SESSION
dump) is fine.

My ZF session settings are:
; Session
resources.session.save_handler = user
resources.session.use_only_cookies = true
resources.session.gc_maxlifetime = 900
resources.session.cookie_lifetime = 0
resources.session.cookie_secure = on
resources.session.cookie_httponly = on
resources.session.saveHandler.class = "Zend_Session_SaveHandler_DbTable"
resources.session.saveHandler.options.name = "web_session"
resources.session.saveHandler.options.primary = "id"
resources.session.saveHandler.options.modifiedColumn = "modified"
resources.session.saveHandler.options.lifetimeColumn = "lifetime"
resources.session.saveHandler.options.dataColumn = "data"

PS. ZF is 1.9.6 and php-5.2.11-jason.1 (x86_64 CentOS). File based
session storage works as expected and there is no problem with DB
(postgres) also.

Thanks,
-- 
Ondrej Ivanic
(ondrej.iva...@gmail.com)

Reply via email to