开发者

Cake Session Terminating too quickly

I'm making an iphone app that communicates with a CakePHP site. On the app & site the user logs in and a session is generated. On the site the session persists but it does not on the app. It seems to expire after about an hour between requests.

I edited Cake's core config file to use CAKEPHP for Session.cookie, set the Session.timeout to be a very big number (e.g. 1036800) and finally Secur开发者_JAVA百科ity.level to 'low'.

The iPhone app displays the token I'm sending up to Cake and the token Cake is expecting for the user, unfortunately the token its expecting is always empty/deleted.

When testing I set the Session.timeout value to be 1 (5 minutes) and 2 (ten minutes) and the session expired at the correct times, but setting it to a large number just seems to make it expire at about an hour :(

any ideas would be great :D


PHP might cleanup the session after a set amount of time. See http://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜