Zend Sessions problem with IE8

Posted by Emil on Stack Overflow See other posts from Stack Overflow or by Emil
Published on 2009-07-05T12:51:02Z Indexed on 2010/05/16 4:10 UTC
Read the original article Hit count: 356

Filed under:
|
|

I'm running a Zend Framework powered website and it seems to have serious problems with sessions. I have a 5 step process where I save the form data in the session between the steps and then save it into the database on the last step.

When we built the site sometimes the session just went away and forced us to restart. Now it seems to work again but recently we discovered an issue with Internet Explorer 8. It fails between step 2 -> 3 and forgets the session. It works fine in IE6, IE7, FF, Chrome, Safari and even in my mobile web browser (SE P1).

We're storing our sessions in the database and if I deactivate the session db handler it works. What's the difference between using the database and not using it for sessions? Do I loose something if I switch back?

Bootstrap:

/* Start session */
$saveHandler = new Zend_Session_SaveHandler_DbTable(array(
    'name'           => 'sessions', 
    'primary'        => 'id', 
    'modifiedColumn' => 'modified',
    'dataColumn'     => 'data',
    'lifetimeColumn' => 'lifetime' 
));
Zend_Session::rememberMe((int) $config->session->lifetime);
$saveHandler->setLifetime((int) $config->session->lifetime) 
    ->setOverrideLifetime(true);
Zend_Session::setSaveHandler($saveHandler);
Zend_Session::start();

and in my step controller

$session = new Zend_Session_Namespace('wizard');

Then I'm just working with $session saving data in a stdClass in $session.

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about session