sessiontimeout is ignored - users are logged off

sessiontimeout is ignored - users are logged off

by Lukáš Kotík -
Number of replies: 0

Hi everyone,

I have an issue with session timeout. I have not found solution throughout the forum.

Using Moodle 3.10.1 (but the issue is also present on test site with 3.11) on virtual server (Debian Buster 64 bit, php 7.4.20). Site is running https – Let’s encrypt.

I want to have much longer session timeout than 4 hours. Whatever I set in https://.../admin/settings.php?section=sessionhandling is ignored and next day I have to log in again. The folder in moodledata/sessions/ remains empty.

Also “EU cookie law” I have to accept very often.. EU_COOKIE_LAW_CONSENT most likely suffers with the same issue.

My current settings is:

# php7.4 cfg.php |grep session
sessiontimeout 2419200
dbsessions 0
sessioncookie prod
sessioncookiepath /
sessioncookiedomain

My structure is – the Moodle is running on a subdomain:

Moodle install folder (subdomain) is “courses” (/www/hosting/...my domain name.../courses)

Moodledata folder is “data/moodle/moodledata” (/www/hosting/...my domain name.../data/moodle/moodledata)

Permissions:

Moodle install – 755 (owner root)

Moodledata – 777 (www-data)

In Chrome, I see MoodleSessionprod cookie and also MOODLEID1_prod with end date that is much longer than I set in sessiontimeout – the end date is one approximately 8 weeks, but the sessiontimeout is 4 weeks. In Firefox the I see no MOODLEID1_prod cookie, only MoodleSessionprod cookie is present.

Further, even though I set rememberusername to yes in “https://.../admin/settings.php?section=sitepolicies” I still see the checkbox “remember username” in the login screen.

I tried to experiment with “sessioncookiepath” with no success, but I am not sure, how this variable should be defined (absolute path or relative path etc.? Should I set it to point to "data/moodle/moodledata/sessions"?).

Any help appreciated!



Average of ratings: -