it seems like the cache files are written twice.
The problem :
Most of the time, when clearing cache, the front and the manager not working but display cache error like :
Parse error: syntax error, unexpected '<', expecting end of file in …
Parse error: syntax error, unexpected 'resource' (T_STRING), expecting ']' in /home/hqdoewe/recette/core/cache/includes/elements/modplugin/9.include.cache.php on line 254
then, the front and the manager become broken, only displaying the error.
the only way is to delete manually the /core/cache folder.
When i try to edit the problematic cached files, at the faulty line, i can see the file is written twice !
in the middle of the file, there’s a <?php … and the file content again.
note :
I’ve used MODX for dozen of sites. For years, it’s my main tool for doing good job.
Most of the time, i do the development on my private server,
and once my client validate it, deploy the site on the client hosting.
I’m not a great developper, but i’m relatively confortable with MODX and PHP.
MODX cache always worked well, for all the sites i did. Never had a problem.
This problem is very specific, but it occured for all the sites i did since MODX 2.7.x (not really sure when it happend first) when they run from OVH shared hosting.
For the strict same site (same files, same db):
- the problem occurs only on shared hosting (mutualisé OVH : https://www.ovh.com/fr/hebergement-web/)
- it never occurred on my vps server (centos7)
- it never occurred on my dedicated server (centos7)
- it never occurred on o2switch shared hosting
Can anyone help me with this ?
thank you