"Coding error detected" and "can not create local file pool file"

"Coding error detected" and "can not create local file pool file"

by Leah Hemeon -
Number of replies: 5
Picture of Testers

Hi there,

I am a long time Moodle user and admin but very inexperienced on the server site, databases, php, etc. Essentially, I'm good inside Moodle, but not outside. I'm in a pickle. I needed to start a fresh Moodle install on my hosted server - cpanel, php, mysql

Moodle package downloaded today from Moodle.org 3.8.1+ and installed completely fresh with a new DB. Install went very smoothly (I've done that before). 

I'm getting a number of errors but I've been searching for hours and cannot figure out how to fix them. My webhost is not familiar with Moodle but insists that /Moodledata and /Moodle file permissions are all correct. 

I don't know how to get more error information to narrow this down further. I've tried completely reinstalling again and that results in the same error. I thought it might have to do with a language pack error so I reinstalled those. 

Error 1 - triggered when you click "Update profile" when trying to change the user profile picture. Tried on Admin account and on an authenticated user/student account. Same error regardless. And yes, I have checked folder permissions (as much as I know how) and my hosting support says that I have plenty (unlimited) disk space.

Error 1 - Can no create local file pool file, please verify permissions in dataroot and available disk space.

Error 2 - triggered when I went to the GUI option to install new language packs. 

Error 2 - Coding error detected, it must be fixed by a programmer. Cache definition core/string requires simple keys. Invalid key provided.

Are these related? If you need more information, please tell me where to find it. I'm very willing to do legwork - I just don't know where to start (other than many, many Google searches, poring through old bug reports, forums, etc.)

Average of ratings: -
In reply to Leah Hemeon

Re: "Coding error detected" and "can not create local file pool file"

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Before diving deeper could you check with the hosting that there is enough storage space - not that you are running in to a user quota limitation?
In reply to Leah Hemeon

Re: "Coding error detected" and "can not create local file pool file"

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You need to switch on Debugging. All the way to 'Developer'. Then reproduce the problems and post the traces you (hopefully) get.
In reply to Leah Hemeon

Re: "Coding error detected" and "can not create local file pool file"

by Ken Task -
Picture of Particularly helpful Moodlers

Know this sounds 'nosey', but with what provider is site hosted?

"unlimited' space ... sometimes if one reads the fine print of providers explanation of that, one would see attached storage devices needed to provide 'unlimited space' - in other words, space usage not dynamic and burstable without some server config.

As you know, not all providers are good 'fits' for Moodle.

PHP version?  MySQL/MariaDB version?

Does provider have forums for customers?

'SoS', Ken



In reply to Ken Task

Re: "Coding error detected" and "can not create local file pool file"

by Leah Hemeon -
Picture of Testers
Thank you all very much for your help. Here's some additional information... new developments but nothing good.
PHP version 7.1.0
MySql version 5.7.29
Moodle version 3.8.1+

Host has now said again that the file permissions are correct and there are no disk space limitations. Host is CanadianWebHosting and I've been with them for years (10+) on a good shared hosting plan. Moodle has always worked ok but I've only ever used it to host my personal portfolio of work (eLearning developer/instructional designer). It's been progressively slowing down with each new upgrade of Moodle (the original install dated back to 1.XX something waaay back when) so I decided to start fresh yesterday and all this happened. To be clear though, I am NOT using the same database. It is completely new.

I had debugging on before but it wasn't throwing any visible errors. I did a complete reinstall this morning - deleted the database and created a new one with a different name, cleared out the moodledata and moodle folders (kept the top level folders so as to hopefully avoid new permissions errors) and downloaded the zip package from Moodle.org again (3.8.1+ built on March 6). Installation went just fine again. I did all of this on a different computer with a different browser (just in case). I was able to log in as an admin and register the site. The first error is still happening though. The second seems to have cleared from the language packs screen. 


I went to turn on full developer debug and the below error happened. I am so far lost on this... waaaay above my head and I'm ready to give up but desperately need this for hosting my portfolio of live SCORM courses... thank you so much for your help!
Coding error detected, it must be fixed by a programmer: Invalid string identifier.
In reply to Leah Hemeon

Re: "Coding error detected" and "can not create local file pool file"

by Ken Task -
Picture of Particularly helpful Moodlers

The key might be this ... 'a good shared hosting plan'.  Yes, you might have hosted there for years and all previously installed versions of Moodle worked but they were't 3.8.1+ ... which has an update coming out this coming Monday ... ie, tomorrow.

Also, this ... '(kept the top level folders so as to hopefully avoid new permissions errors)' ... does that mean code is to go into a subdirectory and you kept any all things above that subdirectory?  Are ownerships/permssions on the directory you are creating the same as directories above the moodle code you are installing?

Have any .htaccess files in any directory?  If so, what do they look like?  Those come into play in a sneaky way! :|

What are ownerships and permissions on the data directory?  Yep, I know you said provider check those, but did you?

You've made no mention of what web service using?  Apache with mod, Apache with fastcgi/php-fpm or what?

Might be related to this 'cannot create local file pool'.

Having said all that ... you could possibly try manually removing the contents of ... that's contents of ... your moodledata/localcache/ directory.  And try it again.  Moodle does try to cache right away - as seen in lines of your error debug.

'SoS', Ken