I’m trying to set up the server to increase the lifetime session to 2 hours to be able to save surveys (Limesurvey) after some time of inactivity. If I try to save after 45 minutes it shows up an error message saying that the session has expired.
I have been reading a lot to find solutions but what I have found so far, didn’t work. Probably because I’m missing something.
This is what I have:
- Plesk 12.5.30
- Limesurvey 2.06+ Build 150831
- PHP 5.3.10
The settings in config-defaults.php (Limesurvey) have:
$config['iSessionExpirationTime'] = 7200;
2 hours which is ok, is what I want but does not work. So I thought that my server settings were overriding the Limesurvey settings. So I went to plesk > domains, selected my domain and clicked on PHP settings, scrolled down and added to the “additional instructions” these two lines:
session.cookie_lifetime = 7200
session.gc_maxlifetime = 7200
So now all my additional instructions looks like this:
max_input_vars = 5000
suhosin.memory_limit = 128
suhosin.post.max_value_length = 5000000
suhosin.post.max_vars = 5000
suhosin.request.max_value_length = 5000000
suhosin.request.max_vars = 5000
suhosin.simulation = 1
session.cookie_lifetime = 7200
session.gc_maxlifetime = 7200
But it didn’t work anyways, I’m still having the same error when trying to save a survey when 45 minutes have elapsed.
Any help would be great.
Thanks a lot.
2
Answers
Check cron tasks:
Usually the session directory is shared by all applications on the same webspace.
So if you have other applications (CMS) running they might set the session timeout shorter and so the LimeSurvey sessions get kicked, too.