Shamrocker
Shamrocker

Reputation: 121

cakephp : session can't write

If the Controller have the code $this->autoRender = false; the session can't write.

function login() {
      $this->autoRender = false;
      $this->Session->write('Student', 'test');
}

Upvotes: 2

Views: 1222

Answers (1)

Stephen
Stephen

Reputation: 18964

If you're using CakePHP 1.3, You most likely have activated your Session Helper, but not your Session Component. Check the manual here. You'll need both of these, probably in your AppController:

public $components = array('Session');
public $helpers = array('Session');

or PHP4:

var $components = array('Session');
var $helpers = array('Session');

Upvotes: 1

Related Questions