CakePHP Session Value Does Not Hit IE Browser

G'day

I do not get the Session value in the Cakephp project IE browser (2.2.0). Please find the script below and suggest me what you 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

// 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.
        }

}

Scenario - 3

  • In this action, I have one form. I get the same session value on this page before publishing the form.
  • As soon as I submit the form and print the same session array in the first line of action, but the result is empty in IE broswer.
  • Works great in other browsers like Mozilla, Chrome and Safari

    The FinalController class 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 this problem. I appreciate the help. Thanks.

+4
2

PHP, cakephp . @session_start() AppController.php.

, , .

+1

.

<?php
// try this one...
class SecondController extends AppController {
    public function index(){
        pr( $this->Session->read('SessionHold') );
    }
}

0

All Articles