Moodle 1.9 Invalid Session Key Error on Registration page

Moodle 1.9 Invalid Session Key Error on Registration page

by Priscilla Holmes -
Number of replies: 8

Hi, I am running Moodle 1.9 on a web host. I am having a real problem with this error on my registration page 

Incorrect sesskey submitted, form not accepted!

I have tried Chrome, Firefox, IE and Edge. The account registration works in IE and sometimes in Firefox but not in Chrome or Edge.

I have asked my host to investigate whether it is a certificate error and they claim that they are able to register using Chrome but i cant. I tried it on my android phone as well and i get the same error. 

I have been reading about this error on other forms like the login or forums but I just cant nail down what is causing the error because it is hosted elsewhere. 


I am just at my wits end.



Average of ratings: -
In reply to Priscilla Holmes

Re: Moodle 1.9 Invalid Session Key Error on Registration page

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Wow...v1.9 erm.... haven't updated in a while I suspect. OK, cruel of me, sorry.... If I am recalling correctly, this issue arises when a session is ended improperly. Likely an outage or shutdown without logging off. I think you have to empty your cookies folder to get rid of the current session, but that is from a long way back.... 

In reply to Colin Fraser

Re: Moodle 1.9 Invalid Session Key Error on Registration page

by Priscilla Holmes -

I know Colin, but unfortunately the host I am using no longer supports Moodle. What a gyp!  So I cant upgrade with them. I would have to upgrade it myself. But how? I dont know what version PHP they would need to support in order for me to do that. Plus I would have to do all the heavy lifting. I am trying to find a moodle service that is not so expensive. Or a host to move it to....

In reply to Priscilla Holmes

Re: Moodle 1.9 Invalid Session Key Error on Registration page

by Priscilla Holmes -

OK Colin, the host says they support PHP version 7.1. How would I go about the upgrade. I am technical but haven't done this sort of thing in long time. 

In reply to Priscilla Holmes

Re: Moodle 1.9 Invalid Session Key Error on Registration page

by James Steerpike -

You also need the Barracuda file format for your database. Better make sure that is supported as well.

In a previous job. I worked in software development. Upgrading complex software is not easy and you have years to catch up.  I would suggest a VPS as a development server and  be prepared to spend some time experimenting and testing.

What do others think? Is it perhaps easier to install the latest version and recreate your courses?

In reply to James Steerpike

Re: Moodle 1.9 Invalid Session Key Error on Registration page

by Pixi Flyer -
Hi there James is correct, also you will need to upgrade to 3.2 first before being able to upgrade to anything later, you won't be able to go straight from 1.9 to the latest. Good luck!!
In reply to Priscilla Holmes

Re: Moodle 1.9 Invalid Session Key Error on Registration page

by Ken Task -
Picture of Particularly helpful Moodlers

+20 to what James said ... not only DB file format changes but character set and collation and converting your DB for Moodle to those ... knowing when you can use PHP 7.0.x or PHP 7.1.x.   An upgrade from 1.9 to 3.4 would be a "march" with stops in-between versions of Moodle to check site/update/upgrade plugins/themes and even upgrade php.   Checking plugins/themes for compatibilty as you 'march'.  Plus backing up entire site at each step in the 'march' would be wise ... don't wanna go one step forward then two ... only to realize one should have done XYZ back a step one ... and no way to get back to that point. :|

If you don't know some of the terms above, one could learn their definitions easily enough, but actually doing could lead to not only frustration ... but loss.     Suggest that upgrading the 1.9.x you have might be a tall order ... and a frustrating journey.

I can speak from experience as I have done those upgrades + migration to new environment before ... not fun ... not something I'd choose to do if there was another way.

Depending upon how many courses (and other factors), there are some things you can do to ease the pain of uploading a bunch of stuff from your 1.9 site.   Each course has an ID number folder in moodledata.   In there one will find the files one is using in that course.   You could XFER all those course ID directories to the new environment in a file system repository so that you can select files from there to place back into courses you are rebuilding on the 3.x site.

There are some other things one might be able to do with 1.9 backups of courses ... if you have any ... but they do involve opening locally and basically copy and paste of text.

My 2 cents of course!

'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle 1.9 Invalid Session Key Error on Registration page

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Ken and James have the right of it, Priscilla, there is no easy way to bridge this sort of gap. The best bet, let's get you going again with your v1.9, then start work on your next move. So, any advance on clearing the cookies and the cache? Anyone? I can't find the v1.9 Docs, so I hope they have been archived somewhere and might be accessible if asked for? 

Next step: Set up a server on your desktop/laptop, using Apache, PHP7.0 and either MariaDB or MySQL Install the latest version of Moodle and if you don't have too many courses, use the v1.9 courses to rebuild what you have. If you have a lot of courses, can you encourage one or two other people to do the same? If it is just you alone, then as long as you don't want to be moving too far away from core, I might suggest a XAMPP Moodle might prove useful here. Just don't do anything fancy with it and it should be OK - [and I really can't believe I just said that...sadsurprise.] 

Pages, Labels, Assignments, Books and a number of other activities: Copy and Paste, a quick solution. Images are a pain here, they will take up time, but if you backup your v1.9 courses, unzip them on your local machine, you should have your images in the unzipped files. As well, there will be some text complete with additional information, if you can read the unzipped xml files. It can take a bit of practice, but it is not overly difficult if you have to time to start on it and patience to persist. 

Quizzes: If you can use phpMyAdmin, access your database and export your quiz questions as *.csv or in an Moodle friendly version. [Aiken type should be OK.] I am pretty certain you can do that in phpMyAdmin, which should be available as a server admin tool anyway. 

Next: Look for a new service provider, this one is certainly not being your friend. Don't be tied to your local region, this is the internet, you can place your domain anywhere you like, anywhere in the world, or anywhere that a provider is prepared to provide you with the service you want. 

This is just a general approach that might, or might not, prove of some value. The idea is to limp along until you have a more suitable alternative available, then switch whenever you feel you absolutely need to or are completely ready to do so. Which I could help some more, but  



In reply to Priscilla Holmes

Re: Moodle 1.9 Invalid Session Key Error on Registration page

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
The low tech, less risk path would be to get a new Moodle site, 3.x, and then transfers the courses manually one by one, probably downloading them to your working computer and then uploading to new Moodle. See https://docs.moodle.org/19/en/Site_backup and https://docs.moodle.org/35/en/Site_restore.

There is no guarantee of success. Moodle changed its course backup format going from version 1 to 2. And your 1.9 might contain additional plug-ins, which are not available in 3.x. Still worth trying.