Cakephp doesn't write a cookie
- by radious
Hello!
I have a problem with writing cookies in cakephp and even don't know how to debug it or where too look for a clue.
I've inherited a project where cookie were only created using the Session component, of course i added 'Cookie' to $components array in app_controller and put this in beforeFilter:
$this->Cookie->name = 'foo';
$this->Cookie->path = '/home/~nick';
$this->Cookie->domain = 'hostname';
$this->Cookie->secure = false; //i.e. only sent if using secure HTTPS
$this->Cookie->key = 'some key';
and in some action i use:
$this->Cookie->write('key', 'value');
I access page by http://hostname/home/~nick/foo and actually try to put even something so silly. I doesn't work.
I would be really gratefully for any clue where to search problem.
Thanks!