Musabbir Ahmed
Musabbir Ahmed

Reputation: 89

Session expires frequently in CakePHP

I am using CakePHP 2.3.6.

I think this question is possibly a duplicate question of these questions :

CakePHP Session Expires - Frequently

cakePHP Session expiring too soon

But, unfortunately, I am not getting any result from these questions' suggestion, which is to increase Session.timeout.

I have 2 controllers in my project, for 2 panels: Users & Admin. Both of the panels are getting logged out after a certain time, may be 30 minutes. But, I am not using Security Component or Auth Component here. My configuration is :

In my core.php file :

Configure::write('Session',array('defaults'=>'php','timeout'=>4320,'cookieTimeout'=>4320/*,'checkAgent'=>false*/,'autoRegenerate'=>true));
Configure::write('Session.save','cake');

Still its not working. What is my fault here ? What should I do ? Please help me.

Thanks

Upvotes: 1

Views: 401

Answers (1)

Dave
Dave

Reputation: 29121

Try this in your Config/core.php.

Configure::write('Session.timeout', '180'); // (180 = minutes)

Upvotes: 1

Related Questions