Your session has timed out. Please login again

Your session has timed out. Please login again

by Alexey Kostikov -
Number of replies: 12
How can I correct the following mistake: "Your session has timed out. Please login again" on my website http://kostikov.clipsal.ru/distant/
Average of ratings: -
In reply to Alexey Kostikov

Re: Your session has timed out. Please login again

by Mauno Korpelainen -

The problem is that your moodledata/sessions folder has not write permissions. Usually the easy way is to give it 777 permissions. If this does not help, delete all sessions from that folder (or whole folder). You may do it with ftp program or commands

rm moodledata/sessions/*
chmod 777 moodledata/sessions

With Apache you sometimes need to use

chown -R apache:apache /var/www/moodledata

If you have Fedora and SELINUX running , take a look at: /etc/selinux/config. You should have: SELINUX=disabled to be able to  set permissions in Fedora

In reply to Mauno Korpelainen

Re: Your session has timed out. Please login again

by Alexey Kostikov -

Hello, thanks for answer, but it dos not help, I don't know why.

I deleted all sessions and made 777 permissions for folder "sessions" in moodledata, but mistake does not disapear.

One moment, if I registered in me site, that then from my name (administrator) go to email. And when man goes to link in email, he is logged, but after system writes You are not logged in again.

Why? Help me. My site is http://kostikov.clipsal.ru/distant

Alexey Kostikov

In reply to Alexey Kostikov

Re: Your session has timed out. Please login again

by Mauno Korpelainen -

You could try to use dbsessions instead: if you have phpMyAdmin change to your database table mdl_config - dbsessions to value 1

If it does not help set that value back to 0, delete the moodledata/sessions folder and try again.

One possible reason is that your server clock has not the correct time. Server session save path could be wrong or without permissions (check php.ini). I had once a problem (when my server was moved) that name server was not updated and moodle was trying to use two servers at the same time with just one domain. If you can't fix it, try a new install...

In reply to Mauno Korpelainen

Re: Your session has timed out. Please login again

by Alexey Kostikov -

Hello, thanks!

I contacted with my hosting holder (company "valuehost" - www.valuehost.ru) and discuss my problem with them.

They say that I could change /home/pub/clipsal5/moddledata/sessions to /home/pub/clipsal5/tmp because in this folder they made necessary permissions for session. But I dont know where I must change these settings. Do you know it? Where is this?

Thanks for help.

Alex Kostikov from Vyborg

In reply to Alexey Kostikov

Re: Your session has timed out. Please login again

by Mauno Korpelainen -

I think you could change your moodledata folder to be /home/pub/clipsal5/tmp in your moodle main folder config.php or if you are making a new install let $CFG->dataroot  = '/home/pub/clipsal5/tmp';

and there you could have /home/pub/clipsal5/tmp/sessions with correct permissions. It seems like your host has restricted some functions and that tmp folder may have some extra settings for you.

In reply to Mauno Korpelainen

Re: Your session has timed out. Please login again

by Alexey Kostikov -

It does not help... I must change "sessions" to "tmp". Where can I change general CODE? System must set up folder "tmp" (in my case) instead "sessions".

Help me, please, change code!

In reply to Alexey Kostikov

Re: Your session has timed out. Please login again

by Mauno Korpelainen -
I'm afraid it does not help you if you have only one folder where you may write because moodle needs to have moodledata folder and its subfolders with write permissions, not only for sessions but for user files.
In reply to Mauno Korpelainen

Re: Your session has timed out. Please login again

by Mauno Korpelainen -
But let's make one more try: did you try to place your moodledata folder INSIDE your wwwroot. You must have full permissions to your wwwroot so it should work. Remember to change config.php
In reply to Alexey Kostikov

Re: Your session has timed out. Please login again

by Daniel Rakijašić -
I had the same problem and here's solution:
Just rename Sessions folder (moodledata/Sessions) into something else (for example tmp) - use ftp client. After that create new folder and name it Sessions. Set attributes to 777.
Clear cookies in your browser and restart it.
Thats it!
In reply to Mauno Korpelainen

Re: Your session has timed out. Please login again

by Andrew Igbo -

My previous post to this forum was regarding the error message “Your session has timed out. Please login again” When this occurs (which is ALL THE TIME!!!) the only way I’m able to resolve it (temporarily) is to clear all the files in the Moodle Sessions directory. Now, what is most perplexing is that although no one has logged in to the system, the Moodle Sessions directory is constantly filled with files…anyone have any idea why this is happening?

Thanks

In reply to Andrew Igbo

Re: Your session has timed out. Please login again

by Chris Bates -

I am having the same problem.  But now when I delete the session directory it no longer helps.

In reply to Chris Bates

Re: Your session has timed out. Please login again

by Andrew Igbo -

I tried every single suggestion and recommendation I found in this forum and NONE worked for me. Finally, I was able to resolve it by doing the following; (I’m using Moodle V 1.9.4)

1. Under “Site Administration” go to “Server”

2. From the “Server” sub-menu, choose, “Session Handling”

3. Under the Session Handling Options, option 1 is “Use database for session information” The default is “No”

4. Check this option (to store session files in the database)

If you are running PHP V 5.2.14 you may need to modify the memory limit ( I did)

* memory_limit should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.

Ok, hope this helps