CakePHP Cookies getting scrambled - Suhosin related

流过昼夜 提交于 2019-12-05 04:34:05

Try this code which will disable cookie encryption:

$this->Cookie->write('Region', 'test', false);
$reg = $this->Cookie->read('Region');
pr($reg);

The write method has the following params:

write(mixed $key, mixed $value, boolean $encrypt, mixed $expires)

By default all values in the cookie are encrypted by CakePHP. However for security reasons you may wish to look into working with the encryption.

CakePHP encrypts cookies by default.

Is your Security.salt value the same in this new installation?

How about the $key value in your cookie controller setup?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!