Session Time Out

Session Time Out

Scott Brubaker -
Atsakymų skaičius: 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?
Įvertinimų vidurkis: -
Atsakymas į 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

Atsakymas į 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.
Atsakymas į Ken Wilson

Re: Session Time Out

Jon Langevin -

Having a similar issue, I find that the Expires header is being set to the past. I thought expires referred to page content, not cookies?

Atsakymas į 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.
Atsakymas į Scott Brubaker

Re: Session Time Out

Gordon Bateson -
Core developers paveikslėlis Peer reviewers paveikslėlis Plugin developers paveikslėlis
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
Atsakymas į Gordon Bateson

Re: Session Time Out

Scott Brubaker -
"remove sessions folder."

Genius! Thank you.
Atsakymas į 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!
Atsakymas į 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

Atsakymas į Gordon Bateson

Re: Session Time Out

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