MoodleTip - #Moodle Access Problem @paulalexbriseno

A colleague recently shared the following question:
I setup a Moodle for our 8th Grade Tech Assessment "Remediation" and I was trying to comment out some code so that the email would not be required and now I cannot login to the Moodle at all with any account; admin, student, or a teacher account.
When I try to retrieve my password I get this error message: "Incorrect sesskey submitted, form not accepted!"
Tried Googling a fix for it but cant seem to find one. Any suggestions?

Here is my response to the question would you have responded?

Here are two approaches you can try, not knowing exactly what you did. Try Approach #1 and then if that fails, Approach #2.

Approach #1 - Fresh PHP Files

  1. If you messed with the PHP files that interact with the dbase, throw out everything but your mods, themes, and blocks folders. KEEP your config.php file in the root directory.
  2. Download and copy in a fresh copy of Moodle from Downloads. Replace everything in the folder, then copy your mods, themes, blocks back into the the fresh copy.
  3. Try connecting again.
  4. Note that in this approach, you don't mess with MoodleData folder AT ALL.

Approach #2 - Changing the Admin Password

  1. Create a new password--such as "Welcome1!" without quotes--for yourself. Go to and create a new password (it will look like this: "2dbaa2bcba911b55e49a4313817c64fb" without quotes).
  2. Copy the md5 hash password generated from the word you submitted (it's easy) and be prepared to paste it.
  3. Using phpMyAdmin, SQLYog, log into your MySQL database.
  4. Navigate to the mdl_user database and browse the data.
  5. When you find the "admin" user account, paste in the password you copied in Step 2 ("2dbaa2bcba911b55e49a4313817c64fb") into the password field. This will replace what you had previously.
  6. Try logging in with your admin user account and the new password (Password: Welcome1!)

That should allow you back in without problem. Then you need to reset your settings.

Finally, make sure to backup your database and MoodleData folder. You can lose the moodle installation, and start over so long as you have those two items backed up.

Subscribe to Around the

Everything posted on Miguel Guhlin's blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure


Paul Alex said…

Thank you for your assistance with this issue. For those of you all reading Miguels blog, I tried his Approach #1 and was able to successfully log back into our Moodle and everything was still in place like before.
jkitterman said…
Great advice! I'd like to add that it's a good practice to make changes on a test copy of a site, rather than the live site. I use Uniform Server (you've mentioned here before) just for that. It's just a matter of copying the files and installing the database. Then, I hack away at the php and css :-) If something works, then it's just a matter of dropping the edited file(s) into the live site. If I crash the site, I simply delete the files, dump the database and start all over. Also, before I replace the files on the live site, I save a backup copy of the original file so that I can replace it if I need to revert back to the original.

Thanks for sharing!

Popular posts from this blog

#Chromecast Add-Ons to Play Various Video File Formats

Free Professional Learning! Education On Air #googleedu

10 Steps to a Blended Learning Classroom #MIEexpert #MIE #tceamie1