Roundcube Community Forum

 

session_lifetime: how does it work?

Started by jjhunt, March 11, 2009, 11:33:12 AM

Previous topic - Next topic

jjhunt

Hi all,

We are running rcv0.2-stable.  I need to have RoundCube timeout after X minutes.  My session_lifetime is set to 10 minutes, but I'm not seeing any timeouts happening.  Do I have to set keep_alives to 0 to get this to work?

Thanks for any help!

Jackie Hunt
Colorado State University

JohnDoh

I dont think setting it to 0 will stop the keep_alives but I think setting it to a longer time than the session lifetime should do the trick.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

jjhunt

Hmmm..that doesn't jive with what the main.inc.php documentation says.  It says the keep_alive time has to be less than the session_lifetime value.  I'm confused.

Thanks,
Jackie

JohnDoh

Yep it does say that but i was thinking may but that would only be if you actually want the keep_alive signal to work. It doesnt matter any way as i have looked at the code now and it checks to make sure the value is less, and if not corrects it.

I cant see a way to disable it just though the config but to prevent the keep_alive from working at all set it to false, and also set min_keep_alive to false. You then also need to add keep_alive to dont_override to prevent the user from overriding this setting. Finally in program/js/app.js comment out "this.env.keep_alive = 60;        // seconds" (line 59 in my SVN copy)

This will prevent RC from sending any keep_alive or check_recent messages and cause the webmail session to expire after what ever session_lifetime is unless something is done by the user. It will also prevent the automatic checking for new messages.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

jjhunt

I'm finally getting back to work on this.  Thanks so much for your post JohnDoh.  I tried what you suggested, and still I'm not seeing any timeouts.

Here's what I changed in main.inc.php:

$rcmail_config['dont_override'] = array('keep_alive');
$rcmail_config['min_keep_alive'] = false;
$rcmail_config['keep_alive'] = false;

I also commented out the line in programs/js/app.js.  Is there anything else I can do?  I'd really like to get this working.

Thanks!
Jackie