Error messages

Error messages

by Graeme Hood -
Number of replies: 6
I have a couple of error messages come up recently after migrating to a new hosting site (may not be linked).

1. A student has had the message "

Your session has most likely timed out. Please log in again." - I have logged in and can't duplicate. 

My server settings for "Use database for session information" are No (default) but would it be better if it was yes ?

2. Have also had errors where students have accessed a quiz (perhaps part way through) and when using the back button get an error. Removing this button I believe has fixed the problem but now students can't go back to previous questions in a quiz. 

3. Pages are not refreshing on computer after update - possibly an issue with local computer caching but never happened on previous server.

Thanks for your help.
Moodle 3.10.1 (Build: 20210118) 
Average of ratings: -
In reply to Graeme Hood

Re: Error messages

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
1. How long are we talking about? That's a legitimate error after a period of time. No it wouldn't. Using the database isn't really suitable for production use.

2. I believe that use of the back button in quiz is not supported.

3. Can you explain what you mean? An example?
In reply to Howard Miller

Re: Error messages

by Graeme Hood -
1. The student has reported getting this error when they log in at different times on different computers. Thank you for the comment on use of database - I have not been able to find any specifics on this.
This is what she has sent to me ...

Message displayed given is
invalidsesskey
Your session has most likely timed out. Please log in again.

She has also said..."I have tried logging in and out, restarting the computer, trying a different browser as well as numerous laptops."


2. I believe that use of the back button in quiz is not supported.
Thank you - I will leave it off.

3. Can you explain what you mean? An example?
When I mark a quiz the grading window opens, I make comments and grade but when returning to the quiz to make the next question the previous still appears like it has not been marked. When I finish marking, the student stride does not appear - I need to clear browser history before it shows. (tried using different browsers and no difference)
In reply to Graeme Hood

Re: Error messages

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You didn't have those problem before the migration, right? Then you haven't inherited them from (old) Moodle. They are rather environment oddities of the new hosting. You need to give us details like:
  • What is your operating system, what web server are you using, what database and what are the versions of everything (including PHP)?
  • How was Moodle installed - especially if you used the likes of Softaculous, Bitnami etc. (clue - *don't* use these installers!)
Please read Before you post... read this...

On 1. How many students were logged in what that happened? Was it a very busy time? How many files (with names sess_*) did you have in moodledata/sessions at that time? How many are there now? What is the range of their created time?
In reply to Visvanath Ratnaweera

Re: Error messages

by Graeme Hood -
Thanks for your reply ...

No more than 20 students logged in at this time so not busy. Not sure on your comment "How many files (with names sess_*) did you have in moodledata/sessions at that time? How many are there now? What is the range of their created time? " - sorry not a server tech person.

No problems were not evident before going to new (commercial server) hosting. Was a new install using cPanel that used Softaculous to install. 
PHP Version 7.3.29
I have seen this message on site administration/server/environment



In reply to Graeme Hood

Re: Error messages

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

It looks like your site is inside – i.e. Moodle is in a subfolder of – a WordPress site. Was that the case with the previous hosting? The WordPress site may have specific web server configuration that is also being inherited by Moodle. Is there a .htaccess file in the source code folder for the site (often called public_html)? What does it contain?

The opcache.enable check only affects performance so it's worth setting up to make the site faster. But it shouldn't be related to any of these issues.

Moodle 3.10.1 is six months behind the latest update so the site is missing the latest bug fixes including 24 security fixes. You should update to Moodle 3.10.6.

In reply to Leon Stringer

Re: Error messages

by Graeme Hood -
It looks like your site is inside – i.e. Moodle is in a subfolder of – a WordPress site. Was that the case with the previous hosting? The WordPress site may have specific web server configuration that is also being inherited by Moodle. Is there a .htaccess file in the source code folder for the site (often called public_html)? What does it contain?

Yes set up the same as last site - and am using wordpress. Appears to be in its own folder on the sever than the wordpress data.
Have a directory of public_html and .htaccess under that, also have .htaccess within the Moodle directory - this one only has in its content.....

deny from all
AllowOverride None
Note: this file is broken intentionally, we do not want anybody to undo it in subdirectory!


There seems to be a few . htaccess within the site directory - is this the one above you were referring to.

I get sent emails when there is new releases of Moodle and through that these were installed automatically - have read the emails again and oops ... its says ... To upgrade these scripts go to your Control Panel -> Softaculous -> Installations.
There you will be able to update the scripts.


Thank you for this. I will update tomorrow.

As you can see I am new to this and working out things as I go. Up until now I have been able to trouble shoot using google but these last errors that some students are reporting are beyond me.

Your help is greatly appreciated.