Reputation: 121
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
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