Internet-Explorer – CakePhp session value does not enter IE browser

It’s so good

I didn’t get the Session value in the IE browser of the Cakephp(2.2.0) project. Please find the following scenarios and suggest What do I need to do.

Scenario – 1

// Here i am storing session value to SessionHold array as follows.

class TestController extends AppController {

public function index(){
$this->Session->write('SessionHold.unique_id', $uniqe_id);
$this- >Session->write("SessionHold.zipcode", $this->request->data['Test']['zipcode']);
$this->Session->write("SessionHold.business" , $this->request->data['Test']['business']);
}

}

Scenario – 2

< p>//In this controller I got the session value

class SecondController extends AppController {

public function index(){
pr($this->Session->read()); // i am getting same session value in this action.
}

}

Scenario – 3

>In this operation, I have a form. Before I post the form, I get the same session value in this page.
>Once I post the form and print in the first line The same session array, but the result is empty in IE broswer.
>It works well in other browsers, Such as Mozilla, Chrome and Safari

class FinalController extends AppController {

public function index(){
pr($this->Session- >read()); // getting value before posting the form

**pr($this->Session->read()); exit;** // not getting the session value after posting the form

}

}

Please help me solve the above problem. I am very grateful for help in advance. Thank you.

If the cakephp session does not work, please try the PHP session. You can use the @session_start() method in AppController.php.

Sometimes I have encountered this problem, but if we do this, it works fine.

It’s so good

I did not get the Session value in the IE browser of the Cakephp (2.2.0) project. Please find the following scenario and suggest what I need to do.

Scenario – 1

// Here i am storing session value to SessionHold array as follows.

class TestController extends AppController {

public function index (){
$this->Session->write('SessionHold.unique_id', $uniqe_id);
$this->Session->write("SessionHold.zipcode", $this->request ->data['Test']['zipcode']);< br /> $this->Session->write("SessionHold.business", $this->request->data['Test']['business']);
}

}

Scenario – 2

//In this controller I get the session value

class SecondController extends AppController { 

public function index(){
pr($this->Session->read()); // i am getting same session value in this action.
}< br />
}

Scenario – 3

>In this operation, I have a form. Before posting the form, I get the same session in this page Value.
>Once I post the form and print the same session array in the first line, but the result is empty in IE broswer.
>It works well in other browsers such as Mozilla, Chrome and Safari

class FinalController extends AppController {

public function index(){
pr($this->Session->read()); // getting value before posting the form

**pr($this->Session->read()); exit;** // not getting the session value after posting the form

}

}

Please help me solve the above problems. I am very grateful for help in advance. Thank you.

If the cakephp session does not work, please try the PHP session. You can use the @session_start() method in AppController.php.

Sometimes I have encountered this problem, but if we In doing so, it works fine.

Leave a Comment

Your email address will not be published.