Sunday, 15 July 2012

php - Zend Framwork Session on Internet Explorer -



php - Zend Framwork Session on Internet Explorer -

this question has reply here:

zend framework session lost 2 answers

still couldn't create works after post link: zend framework session lost

i have sign form allow users register , redirect them right away pages. work great on every browsers except internet explorer.

i have tried different ways, still can't create work. after user saved database session won't store. if take out save of user, session , cookies can store.

here's code:

public function signupaction() { $signupform = new application_form_usersignup(); if ($this->getrequest()->ispost()) { if ($signupform->isvalid($this->getrequest()->getparams())) { $user = $this->_helper->model('users')->createrow($signupform->getvalues()); if ($user->save()) { //set email cookies displaying login inputfield setcookie('display_email', $this->getrequest()->getparam('email'), time() + 3600*24*30, '/'); <-- not working zend_session::rememberme(186400 * 14); <-- not working zend_auth::getinstance()->getstorage()->write($user); <-- not working $user->sendsignupemail(); <-- i'm receiving email $this->gethelper('redirector')->gotoroute(array(), 'invite'); return; } } } $this->view->signupform = $signupform;

here's way i'm doing still doesn't working on ie:

public function signupaction() { $users = new application_model_dbtable_users(); $signupform = new application_form_usersignup(); if ($this->getrequest()->ispost()) { $firstname = $this->getrequest()->getparam('first_name'); $lastname = $this->getrequest()->getparam('last_name'); $email = $this->getrequest()->getparam('email'); if ($signupform->isvalid($this->getrequest()->getparams())) { $user = $this->_helper->model('users')->createrow($signupform->getvalues()); $user = array('email' => $email, 'first_name' => $firstname, 'last_name' => $last_name); $users->insert($user); zend_session::rememberme(186400 * 14); zend_auth::getinstance()->getstorage()->write($user); $this->_redirect('invite'); } } $this->view->signupform = $signupform;

try using session_write_close before calling redirect. or think zend has equivalent, see: zend_session::writeclose

only other thing comes mind (with ie beingness browser giving trouble) p3p policy. @ talha's post here: zend sessions problem ie8

php zend-framework session zend-db zend-session

No comments:

Post a Comment