Session Time Out

Session Time Out

de Scott Brubaker -
Número de respuestas: 9
I'm trying to clone our production environment in a test environment. I've copied our production moodle directory, it's data directory, and full mysqldump of the database to the test server.

It comes up correctly, but whenever I try to login I get "session has timed out" message and cannot login. Everything in the transfer seems to have gone correctly and without errors. What could cause this and how to fix it?
Promedio de valoraciones: -
En respuesta a Scott Brubaker

Re: Session Time Out

de Ken Wilson -

Scott

Some ideas.

1. Can you make sure that everything in the current php sessions folder (session.save_path in php.ini, or moodledata/sessions) is deleted and that your webserver has rw permissions (if necessary chmod 777 to ensure - but change it back later).

2. It could be that the test server is sending expired headers. Check the expiry date of the moodle cookie by going to http://www.rexswain.com/httpview.html and entering the website details - you should see output which shows that the cookie expires sometime in the future.

Finally, run the session-test.php script (e.g. http://your.domain.com/moodle/lib/session-test.php). It will provide some information as to whether there is a problem.

Ken

En respuesta a Ken Wilson

Re: Session Time Out

de Scott Brubaker -
I am not able to use the rexswain.com since this test box doesn't have access to the outside world.

However, using the session-test.php page in the moodle directory I got "No session found - starting a session now." and after I reload the page I get "Session found - welcome back! Sessions are working correctly". I'm guessing thats good news.
En respuesta a Scott Brubaker

Re: Session Time Out

de Scott Brubaker -
I should also add that I have a fresh install of Moodle 1.7 running on the same box with its own separate database and it runs fine.
En respuesta a Scott Brubaker

Re: Session Time Out

de Gordon Bateson -
Imagen de Core developers Imagen de Peer reviewers Imagen de Plugin developers
Did you remove the "sessions" folder within the Moodle folder?

If the two Moodle sites are now running on the same server, you could also try modifying the "Cookie prefix" and "Cookie path" so that the cookies of the two Moodle sites don't get confused.

Gordon
En respuesta a Gordon Bateson

Re: Session Time Out

de Scott Brubaker -
"remove sessions folder."

Genius! Thank you.
En respuesta a Scott Brubaker

Re: Session Time Out

de Steven Skelhorn -
We were having the same problem, thanks for the info. All working (fingers crossed) now. At last a answer this site which works!
En respuesta a Steven Skelhorn

Re: Session Time Out

de Keith Chow -

but how to set the time out session?

I have try this and it works; however, after the session is time out, I still have

to login twice. Can somebody tell me what should I add to remove the sesson?

Many thanks

En respuesta a Gordon Bateson

Re: Session Time Out

de Andrew Steele -

This is quite an elderly thread but it almost answered the question for me... Took me awhile to work out that the sessions folder was is the data folder rather than the Moodle site folder ;)

Andrew