NewFormz Posted September 10, 2014 Posted September 10, 2014 So I've come back after the holidays and Moodle has decided to start playing up. No one can login, myself included. All we get is the following message: Your session has timed out. Please login again. I've checked the server space and that is fine. Some other people were having issues with a sessions folder but we not appear to have one (Creating one didn't fix anything either). Has any one else had this problem, if so can they recommend a fix. This wasn't setup by myself and I'm a bit of a Linux noob but will give any suggestions a try. Thanks, Steve
IrritableTech Posted September 10, 2014 Posted September 10, 2014 Are all your clock synchronized between servers?
NewFormz Posted September 11, 2014 Author Posted September 11, 2014 Yes, they are all showing the same time. Anything else to check? Thanks
bossman Posted September 11, 2014 Posted September 11, 2014 (edited) @NewFormz: Is this any help: Cookies Also here: Permissions As Moodle times sessions based on cookies it could be something to do with your browser settings if you have updated across the network, Hope you get it sorted Edited September 11, 2014 by bossman
NewFormz Posted September 11, 2014 Author Posted September 11, 2014 I've already gone through those threads but with no joy, thanks anyway. Everyone else seems to fix this problem by changing the permissions on the sessions folder. I can't find that so have created it manually and set permissions but it doesn't fix anything. It's strange because it was fine last year and nothing else has been changed or updated. I have tried multiple browsers on different devices and that has no effect.
unixman_again Posted September 11, 2014 Posted September 11, 2014 If the sessions folder isn't there, it is almost certain that you are using the database for session handling (see Site administration / Server / Session handling). There are some notes there-in about MySQL config, which may not be correct.
NewFormz Posted September 11, 2014 Author Posted September 11, 2014 I was just reading something else that leads me to believe it might be an SQL problem. But without being able to login at all I can't check the settings you mentioned. Does any one know a way to check anything relating to SQL via the linux server directly?
unixman_again Posted September 11, 2014 Posted September 11, 2014 (edited) Here's what is says about using the database to handle sessions: "If enabled, this setting will use the database to store information about current sessions. Note that changing this setting now will log out all current users (including you). If you are using MySQL please make sure that 'max_allowed_packet' in my.cnf (or my.ini) is at least 4M. Other session drivers can be configured directly in config.php, see config-dist.php for more information. This option disappears if you specify session driver in config.php file." It appears as though dbsessions in the mdl_config table controls whether or not to use the database. 0 = use directory on disk (which is what we do). If it isn't 0, you could perhaps set it to 0 and it will use the session directory on disk (I think). Obviously YMMV and if it completely stuffs up should you try this, it isn't my fault! Edited September 11, 2014 by unixman_again 1
NewFormz Posted September 16, 2014 Author Posted September 16, 2014 It appears as though dbsessions in the mdl_config table controls whether or not to use the database. 0 = use directory on disk (which is what we do). If it isn't 0, you could perhaps set it to 0 and it will use the session directory on disk (I think). Obviously YMMV and if it completely stuffs up should you try this, it isn't my fault! Do you know how I do this? I can't find the mdl_config table anywhere so I can't change the dbsession to 0. Thanks
NewFormz Posted September 16, 2014 Author Posted September 16, 2014 Wahoo! I've got it working again! It turns out I had a corrupt database. I managed to fix it by using this guide: https://docs.moodle.org/27/en/How_to_check_your_database_for_corruption Thanks to everyone that helped to point me in the right direction.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now