Session Time Out

Session Time Out

Scott Brubaker - દ્વારા
Number of replies: 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?
In reply to 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

In reply to 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.
In reply to 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.
In reply to Scott Brubaker

Re: Session Time Out

Gordon Bateson - દ્વારા
Picture of Core developers Picture of Peer reviewers Picture of 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
In reply to Gordon Bateson

Re: Session Time Out

Scott Brubaker - દ્વારા
In reply to 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!