When we enable ssl for login/purchase related requests. it usually lose session when moving from ssl to non-ssl which might lead to you lost login status.
Workaround is to disable the session transition in cake core.
Below workaround works for cake1.3.4:
Cake was switching the session.cookie_secure ini value on-the-fly while under SSL connections automatically, So the cookie being created was a secure cookie, which the second page wouldn't recognize.
Solution, comment out /cake/lib/cake_session.php line 420 ish:
ini_set('session.cookie_secure', 1);
本文解决了一个在启用SSL后从SSL切换到非SSL时丢失会话的问题,导致登录状态丢失。解决方案是在CakePHP中禁用会话转换,具体为注释掉cake/lib/cake_session.php中的特定代码行。
395

被折叠的 条评论
为什么被折叠?



