Coding Error

Coding Error

by Lawrence Boateng -
Number of replies: 3

I am using Moodle 4.0 on Linux Mint. I was creating some courses and the lights went off. When the lights came on I tried accessing moodle and I had this 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.

I cannot create courses again. How do I fix it?
Average of ratings: -
In reply to Lawrence Boateng

Re: Coding Error

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Lawrence,

The current version of Moodle is 3.3, so you may be a little confused about the version you're running.

In any case, I would guess that this a file permission error.  Check that the user your web server is running has can read and write to your dataroot directory correctly.

In reply to Mark Johnson

Re: Coding Error

by Lawrence Boateng -
Hi Mark. Thanks for the reply. I checked from other sources and I have to delete the cache files in the /moodledata/cache directory.


In reply to Mark Johnson

Re: Coding Error

by Lawrence Boateng -

Hi Mark. I have been able to resolve the issue. It was with the cache files in the  /var/moodledata/cache directory. I did not have permission to empty the folder so I used the command;

chmod -R 0777 /var/moodledata/cache to allow everyone access to the directory. I then deleted the files in the directory and it worked.