Problem login

Problem login

by Aleksandar Petic -
Number of replies: 6

In home page www.zoors.org/moodle2 i don't login.

Video is here


No error, but says Your session has expired. Please login again.

Delete session, nothing permission on moodledata is 777, session 777.

Please help.


Average of ratings: -
In reply to Aleksandar Petic

Re: Problem login

by Colin Fraser -
Picture of Documentation writers Picture of Testers

AFAIK, there are different sessions classes dependent upon versions. In your browser, clear the cache, so if any session data is in the cache, then it should be deleted. For a v2.9, my understanding is that the config.php has a line that looks like: 

     $CFG->session_handler_class = '\core\session\memcached';

and another line that should look like: 

     $CFG->session_memcached_lock_expire = 7200;

The first line tells us what type of caching is used, and the second tells us how long a session will last, in this case, 120 minutes. You should also check to make sure there is enough memory made available in the database ini file. For most Moodles, 4MB should do it, but I don't think this is a hard and fast rule, more like a guideline. More the merrier, likely, but not too much.  

If something has happened to the memcache or its values, it is likely to do what yours is doing. It is likely reading data from an older session that has expired. /clearing the cache may fix it. This may also be caused by a damaged moodle/cache directory, which can be fixed by deleting the entire directory and replacing it with an undamaged version. 

These may work, or may not, no idea, every sessions problem seems to have a different solution.... 


Average of ratings: Useful (1)
In reply to Colin Fraser

Re: Problem login

by Aleksandar Petic -

Thank you,

after write in config.sys

 $CFG->session_handler_class = '\core\session\memcached';

error: "The procedure for processing session is incorrectly set."

In mdl_config setings:

sessiontimeout = 3600
dbsessions = 0
sessioncookie =
sessioncookiepath=\moodle2\
sessioncookiedomain=

In reply to Aleksandar Petic

Re: Problem login

by Aleksandar Petic -

In table mdl_cache_flags value of timemodifield is 1 hours earlier and expiry time is now() ????

Server time is OK.

In reply to Aleksandar Petic

Re: Problem login

by Aleksandar Petic -

Please help me !!!

In reply to Aleksandar Petic

Re: Problem login

by Colin Fraser -
Picture of Documentation writers Picture of Testers

I can't I am afraid, apart from the advice above.... but obviously, the incorrect value is the now()  But why is that function in the database? As a value? or is it the Epoch/Unix timestamp reading as the current time? 

If so then what's changed? Something in the server could have caused it because the timestamp is generated as a system value not a Moodle value. Check the server error logs I suggest. So why is Moodle reading it as now()? 

If your config.php value is showing the sessiontimeout value at 3600 that is 1 hour, so change it to 7200, 2 hours, see what happens.  As I understand it, that session value is changed every time an action occurs, like a click for navigation, opening new page and such.