Session Time Out

Session Time Out

Scott Brubaker -
Колькасьць адказаў: 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?
Сярэдняе рэйтынгаў: -
У адказ на Scott Brubaker

Re: Session Time Out

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

У адказ на Ken Wilson

Re: Session Time Out

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.
У адказ на Scott Brubaker

Re: Session Time Out

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.
У адказ на Scott Brubaker

Re: Session Time Out

Gordon Bateson -
Выява Core developers Выява Peer reviewers Выява 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
У адказ на Gordon Bateson

Re: Session Time Out

Scott Brubaker -
"remove sessions folder."

Genius! Thank you.
У адказ на Scott Brubaker

Re: Session Time Out

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!
У адказ на Steven Skelhorn

Re: Session Time Out

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