your session has timed out - please login again

your session has timed out - please login again

by Rob Haeusler -
Number of replies: 7

I'm going around in circles and need some advice moodle_latest 2.1 (I think it is as I can't login to check.

I've deleted all the sessions in moodledata/sessions, and they get recreated each time I try to login. But I keep getting the same error message (as is every other user) from both ubuntu and windows firefox and IE.

Average of ratings: -
In reply to Rob Haeusler

Re: your session has timed out - please login again

by Ken Task -
Picture of Particularly helpful Moodlers

Site Admin -> Server -> Session handling

Timeout? Default is 2 hours
Cookie prefix?  Default is blank.  If this is a recently upgraded site to 2.x, suggest setting the cookie prefix to something like: NEWSITEMDL2

In browsers, clear cookies.

In Apache server access logs, one should see something like the following:

"POST /site/login/environment.php?sesskey=toSBXXS3t2&flashversion=11.0.1 HTTP/1.1" 200

Has there been any change to User Policies? or Authenticated user role?

'spirit of sharing', Ken

In reply to Ken Task

Re: your session has timed out - please login again

by Rob Haeusler -

Thank you for your ideas.

At present, unable to access site in any form, except via cpanel to check files and phpmyadmin for database tables.

Where do I set cookie prefix?

Yes recent upgrade from 1.9 to latest stable build.

No change to user policies or authenticated user roles

In reply to Rob Haeusler

Re: your session has timed out - please login again

by Adrian Wood -

Have you ensured you have space in the moodledata directory?

We saw the same issue and it was because we had run out of space!

In reply to Adrian Wood

Re: your session has timed out - please login again

by Rob Haeusler -

Thank you for your suggestions.Still no joy, and getting urgent as I need to get access to student files to complete rollbooks.

Plenty of room on server - unlimeted space.

I have tried deleting all session files, removing cookies and restarting browser.

I have tried logging in with different browsers on computers that have never accessed the site.

I have deleted all my access records.

I have changed my last login times, current login and last access times back to when I first established the moodle installation.

In reply to Rob Haeusler

Re: your session has timed out - please login again

by Ken Task -
Picture of Particularly helpful Moodlers

Cookie Prefix:
Site Admin -> Server -> Session Handling

Timeout (session timeout) default 2 hours.
Cookie Prefix is blank.  Set it: one word - no spaces - representative of the Moodle.  Example: http://site/kensmoodle Cookie: kensmoodle

Once set, logout, then log back in again.

Check Firefox cookies
Preferences -> Privacy -> Remove Individual cookies
In the Search as per example: kensmoodle

What does one see?  One for the moodle session that has:

host: your host

Path: /

Send For: Any type of connection

Expires: At end of session

Cron job set to run how often?

In reply to Rob Haeusler

Re: your session has timed out - please login again

by MariCarmen Gonzalez-Videgaray -

I've got the same problem at www.inteligencianet.org. I've tried all options and it's the same. Can you help me please?

In reply to MariCarmen Gonzalez-Videgaray

Re: your session has timed out - please login again

by Guy Thomas -
Picture of Core developers Picture of Plugin developers

Ken's tips worked for me.

However, you may not be able to log in to change the cookie settings.

If that is the case then you can do it directly from the db.

Open the mdl_config table and set the sessioncookie field to what ever you like - e.g. "newmoodle2"

If you don't have a method for accessing the table visually and changing the field then you can do it via sql:


update mdl_config set value='newmoodle2' where name='sessioncookie';

Average of ratings: Useful (2)