Help required! Getting Error:Coding error detected, it must be fixed by a programmer: Failed to unserialise data from file. Either failed to read, or failed to write
Now this looks serious to me. My first thought was the DB. I remotted into the moodle server and pulled up the WAMP utility to look at the DBs, maybe find some mysql query that would correct the issue. I was thinking, "when did I last backup the moodle DB for the site?"...I even went so far as to load phpmyadmin and back up the site db...just in case i killed it running a script.....come on, Ive been doing this a long time...it was my instinct to think DB.
Alas, I was wrong. Thankfully. After googling the error message, I found a very useful tip in a moodle forum about it.
Solution
the moodle is not actually down, you can log in still as admin. and flush the cache on the site. After flushing cache, the site popped right up. Blood pressure decreasing.Final thought. Why did this happen? Will it happen again?
Notes
I did a full infrastructure upgrade about 1 week ago. Upgraded the WAMP to 3.1, since Moodle 3.4 required higher version of PHP.
Also. If you see this error and you cannot access the moodle site admin - then option two is to empty a related folder in the moodledata area. I double check this too and was able to browse the moodledata drive on my server and found the folder in question.
:Didn't get the same error but somthing similar ... don't re-call what it was now, but ... took a different approach and solved the problem. The approach if you have command line access to /moodledata folder. Manually remove the cache folder and it's contents. I re-created an empty cache folder with ownerships/permissions for apache."
If I ever need to do this, I would first try just dumping but leaving the cache folder...
Addendum: I created a script (a windows script) that calls a php file that dumps the cache. As long as I can access the server, even if the moodle is down or I cant log in, I can enter a command window and issue this command....which does the trick of dumping the moodle site cache.
Execute this file, php.exe located in this path passing in the purche_caches.php file located in this path.
c:\wamp64\bin\php\php7.0.23\php.exe c:\wamp64\www\moodlesite\admin\cli\purge_caches.php
Thanks, for providing good Information to community…
ReplyDeletePhp Web Development Company Bangalore | Hire Magento Developer In Bangalore | Internet Marketing Company in Bangalore | Magento Development Company Bangalore
LMS Moodle Moodle Development Services learning management system is a simple and flexible program that allows for the data to be stored in text or graph form. Lds has its own set of features, which includes graphical user interface design tools, command-line utilities such as graphs, advanced metrics analysis solutions, time-series databases
Delete