function __initSession() {
$iniSet = function_exists('ini_set');
if ($iniSet && env('HTTPS')) {
ini_set('session.cookie_secure', 1);
}
switch ($this->security) {
case 'high':
$this->cookieLifeTime = 0;
if ($iniSet) {
ini_set('session.referer_check', $this->host);
}
break;
case 'medium':
$this->cookieLifeTime = 7 * 86400;
if ($iniSet) {
ini_set('session.referer_check', $this->host);
}
break;
case 'low':
default:
$this->cookieLifeTime = 788940000;
break;
}
[/CODE]
Give a look at the source file. You can set the Security.level to 'low' to get a long cookieLifeTime. Do not make a redirect from other sites('session.referer_check') to your site, or your session will lost too if you set 'medium' or 'high'.
On Mon, Aug 3, 2009 at 1:34 AM, Persivo Cunha <rickypaz@gmail.com> wrote:
Hi, try to modify your timeout, and keep Security,level in low. You
must open core.php and modify the line Configure::write
('Session.timeout', '120'); Put 200, or what you want. You'll be
logged 200 x 300 seconds. I don't know if it will work because I use
120 and low, and I can be connected for a very long time.
On 1 ago, 14:51, Marcel <vermas...@gmail.com> wrote:
> Hi,
>
> I'm using cake's AuthComponent for login/logout etc.
> But sometimes when I click around the site I'm getting logged out.
>
> No error message - nothing. Rarely I've also seen "white" screens. But
> no error message on the screen (debug is enabled) and no errors in any
> log files (webserver+cake).
>
> I was not able to surely reproduce this, it just happens randomly. But I
> just got logged out by clicking very fast around the page. I think cake
> logs me out when I click to links at the "same" time (i.e. click one
> link and fastly any other link before the site loads). This is really
> annoying :(
>
> Security.level is set to "high", but it also happens at "low". I'm not
> using any ACL stuff.
>
> Maybe someone has any tip?
>
> Marcel
--
Thanks
Joshua
--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment