I’m hosting on WPEngine, PHP7 environment.
When attempting installation I can’t get past this error on the first screen when accessing the piwik directory.
Failed to write cache file “/nas/content/live//piwik/tmp/templates_c/e3/e38a4ca8ff5e946c89ff7625f5a9ad63d8c7afe45cc4b2f8b4fb797dd33a1a86.php”.
We’ve checked it server-side, and permissions are ok.
Removed the temp file above and retried.
Tried changing permissions to 777.
Still the same error.
The only thing I can read from the error message is that php can’t write into the tmp folder.
If you have shell access to the server you could try creating a file as www-data (or the user php is running as) and check if an error occurs.
If you don’t I’m running out of ideas as you have already checked the permissions. Maybe contact your hosting provider as 777 permissions should always enable everyone to write.
Ok so we’ve had WPEngine run through a bunch of troubleshooting.
There’s nothing they can find at this point despite messing with permissions and file ownership.
Here’s where we go to in the end:
"I am not seeing what is going on there, when it generates the file, it seems to generate it with the incorrect permissions then instantly gives you: Error in Piwik: Failed to write cache file "/nas/content/live/ … /_analytics/tmp/templates_c/e3/e38a4ca8ff5e946c89ff7625f5a9ad63d8c7afe45cc4b2f8b4fb797dd33a1a86.php
“You may check back with piwik and see if they have any other requirements, I do not see anything server side blocking it, I am not sure what else they would need setup”
Ok, completely bizarre resolution to this, but posting anyway in the hope it’ll help someone!
After much troubleshooting server-side, we tried it from another browser in incognito. And…what do you know, no error and the installer worked fine.
So…even though the error messages clearly indicate a server-side permissions issue, it looks like a local problem with temp/cookies etc. Haven’t had a chance to test and confirm.
So having the following which is similar to your issue
“Error in Matomo: Failed to write cache file "/server/path/tracking/matomo/tmp/templates_c/df/df65558b8bd9793c61bc07977ef0e8c80157ac223f4bca9d2d9b6c8623dfc8b7.php".”
And tried your suggested attempt with incognito mode, can’t login that way. Have a full server with logs so at best i’m shooting for reinstall with existing DB. Which I did try but it still gives the error, just a new filename thats erroring