Emil
Emil

Reputation: 581

Zend Sessions problem with IE8

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.

Upvotes: 0

Views: 2073

Answers (2)

talha bulut
talha bulut

Reputation: 11

Add this header to fix this issue:

header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');

Upvotes: 1

Justin
Justin

Reputation: 5069

How is your session being stored? Is this happening in Zend_Form multistep, or your own?

My guess is that your data between steps is growing too large to be stored in your session storage strategy.

Upvotes: 0

Related Questions