Friday, August 31, 2012

Sessions expiring when they should not

We are using CakePHP 2.2.1 on Ubuntu 12.04 but I notice this behavior also on my Mac running on XAMPP and as far as I know we have always had this problem.

I would expect that:
  1. The session expires if after a certain amount of time if there are no more calls to the server.
  2. Activity on the server should update the expiring time.

Instead we noticed that after a certain amount of time, the user get logged out and he has to log back in even if he accessed a page just a a minute before.
I actually put even a "hertbeat" AJAX call that is been called every 20 minutes that was supposed to prevent the session to expire, but sessions keep getting lost.

Is this the intended behavior?

If it not I am not sure if the problem is on the frontend's cookie or the backend;s session. I noticed that the CAKEPHP cookie has 6h expiration time since I log in and it never get renewed.

Best,
   Chris



--
--Everything should be made as simple as possible, but not simpler (Albert Einstein)

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 

No comments: