I have a register form, when user sign up, it will redirect him to his page.
All work fine in firefox and chrome, but in internet explorer. It looks like after the user information is saved, the session went off and it won't redirect the user to his page.
How can I fix this issue on IE?
$user = $this->_helper->model('Users')->createRow($signupForm->getValues());
if ($user->save())
{
Zend_Session::rememberMe(186400 * 14);
Zend_Auth::getInstance()->getStorage()->write($user);
$user->sendSignUpEmail();
$this->getHelper('redirector')->gotoRoute(array(), 'invite');
return;
}
I'v got a similary problem to create session in iframe on IE before a redirection, and this works for me :
Try to put in the Zend Action :
$response = $this->getResponse();
$response->setHeader('P3P', 'CP="CAO PSA OUR"', true);
See What does header('P3P: CP="CAO PSA OUR"'); do?
You seems to keep posting variations of the same question. There's nothing in your code which should work differently on different browsers. You need to debug this to see how far IE is getting, that will help you identify the root cause of the problem.
So, do some debugging to try and answer these questions:
- Does
$user->save()
return true? (i.e. does IE go into the if statement)
- If it does go into the if, what is in
$user
? Try var_dump($user);exit;
inside the if to see what you get
- Does
$user->sendSignUpEmail();
get called?
- If it gets to the redirect part, what headers are being sent? (You should be able to check this using IE's developer tools)
If you are testing in IE on a different machine to the one with browsers that are working, also check the system clock, as incorrect date/time can cause sessions to be expired immediately.