-1

i am working on a Cakephp 2.x ... i am using auth component ... the problem write now is that the session automatically expires after some minutes.. i mean if the user does nothing then CakePHP logs them out after some period...i want to make the session time forever unless he click the logout button ..i dont know how to to do this .. any help would be greatly appreciated

Here's my config code:

 Configure::write('Session', array(
    'defaults' => 'php'
));
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
  • 1
    Have you *ever* tried reading the book before asking here? http://book.cakephp.org/2.0/en/development/sessions.html#session-configuration – floriank Jul 26 '13 at 14:52
  • well i have seen dere ..they are explicitly writing the time period ... which i dont want .. e.g 'timeout' => 4320 //3 days – hellosheikh Jul 26 '13 at 15:14
  • How many minutes is "some minutes" - how long is "some period"? Is your question how to change the timeout, or that users are being logged out after e.g. 2 minutes? – AD7six Jul 26 '13 at 19:19

1 Answers1

1

I think the problem is that you're using the default php sessions and they are configured (in php.ini) to expire sooner than you want to. See.

If you want your logins to live forever it's probably better to use cookie based login. See this plugin for instance.

Community
  • 1
  • 1
tersmitten
  • 1,310
  • 1
  • 9
  • 23