CakePHP Session keeps getting reset

I set the Session variable with ajax call. I tried both with the help of a helper and with the direct syntax of PHP $ _SESSION. For some reason, whenever I reload the page, all SESSION data disappears.

What annoys about it is that it happens sporadically. At first I thought it was due to the browser that I used, but it is not. I tried to change all session settings in core.php and no combination seems reliable.

Any thoughts on how I can fix this problem?

0
source share
1 answer

You need to open the file app/config/core.phpand change the section Security.level. From the manual:

Security.level

CakePHP. , "Session.timeout" .

: 'high' = x 10 'medium' = x 100 'low' = x 300

'' '' session.referer_check

CakePHP , "Security.level" "".

core.php Security.level low , Session.timeout . , , .

+1

All Articles