Have you tried a fresh download of the code to your local machine? Plus a new moodledata folder and database. I would start there - I suspect that maybe your code became corrupted or permisssions got messed up on the cloud flare server. If you then tried to load that copy of code on your local server, it could be that whatever problems were created on the other server came across.
Installing and upgrading help
Installing - Refused to execute script
This discussion has been locked so you can no longer reply to it.