General help

 
 
I Teach With Moodle
Locked out of Moodle 2.4
Group Testers

Hi, 

I have finally done it. I have managed to properly lock myself out of my Moodle 2.4 test installation. Here is what I did:

  • setup a new memcached 'caching' store
  • assigned files and sessions to be kept in there
  • logged out
  • tried to log back in - no luck

In order to fix it, I have:

  • tried to revert to sessions saved in DB (using PHPmyAdmin)
  • deleted all sessions from disk (never know...)
  • clear all browser cache (I cannot clear Moodle caches as I am logged out)
  • rebooted, restarted Apache and Memcached
  • checked Apache & memcached error logs (no mention of any issues)
  • no debugging messages (set to developer)

None of the above has worked. Any ideas? For example I cannot find where the config for the cache store is saved in the database. If I could find it, I could probably change it there. I could probably revert to an old backup but I didn't do anything 'out of the ordinary' here - might have uncovered a bug?

FWIW the Memcached store is working well (I can see it in the stats)

Cheers, 
Fred

PS: Ubuntu 12.04 server, box standard Apache & PHP, APC

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Locked out of Moodle 2.4
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

It seem that the cache definitions are stored in moodledata/muc/config.php. Try renaming that to config-backup.php, or someting, and see if that lets you in. If it does, delete the backup. If it does not, rename the backup back to the original file name.

 
Average of ratings:Useful (1)
I Teach With Moodle
Re: Locked out of Moodle 2.4
Group Testers

Thanks Tim, deleting the file did the trick.

On a side note, because the cache definitions are saved in moodledata/muc/config.php, it makes things very awkward for those using APC (or other opcode cache I would imagine). In order to see the changes made on the caching 'dashboard' Administration>Plugins>Caching>Configuration, one has to clear the opcode cache.

So far, I have failed to get Moodle to play nicely with my memcached store. The store works (I see that in the stats) but I have a lot of get_misses. There are also quite a few admin functions that no longer work e.g. purge caches, cache performance when I have the memcached store enabled and mapped. Altogether it makes Moodle buggy. I wonder whether this is a bug or just on my installation. Initially I thought it was due to APC and disabled, rebooted and same happened without APC. I'll keep digging.

Cheers, 
Fred

 
Average of ratings: -
Picture of Ken Task
Re: Locked out of Moodle 2.4
Group Particularly helpful Moodlers

Try Tim's suggestion first ... some thoughts:

In looking over memcached installation notes
http://www.php.net/manual/en/memcached.installation.php

Session handler support is enabled by default. To disable it, use --disable-memcached-session switch.  Not sure where one does that … an .ini file?

Session issues could result in no logins, could they not?

Don't use Ubuntu, but isn't memchached an add-on (loadable) module to PHP?

Rather than un-install, how about disabling it.  If I re-call correctly, you'll find the loadable modules in another directory in apache config - a php-memchached.ini file?

Just hide it … mv php-memcached.ini .php-memcached.ini (moving to a hidden file [file begins with a '.'] means Apache can't see it and won't load it).

Restart apache service.

Then see if you can login.

'spirit of sharing', Ken

 
Average of ratings: -
I Teach With Moodle
Re: Locked out of Moodle 2.4
Group Testers

Hi Ken, 

thanks for your message. I tried Tim's suggestion and it worked. I also looked at your solution and in doing so I realised that the problem wasn't just with sessions & memcached but a deeper problem. I don't have a full picture and will need to keep digging.

Cheers, 
Fred

 
Average of ratings: -