I found the same error today .
As I am a user that pays for a server , I cannot run a script in the apache server.
I also found that the other instructions were not exactly clear ?
So to solve the issue
1) I went into the server and found the folder that I had installed Moodle in ( your folder)
2) I opened it and found the folder called "data" opened it to see the "cache " folder and then instead of deleting it to start with, I simply renamed it ( why because it took the safety option first.
3) This solved the issue and I had access to both front and (admin) .. sections..
4) moodle of cause then generates a new cache folder and away we went.
5) I then tried logging in to Moodle admin and did a test purge from there...
I think if you are trying to lend a little advice - you might presume that people might not be as clever as you. ( that might include me)
Ok.. I hope this works for me..