Hi, I have a bit of an esoteric problem that has occurred now on a couple of my cakephp apps. Basically, I make a Shell script and run it as a cron job from the root crontab. Somehow this results in a bunch of error warnings on certain pages whenever I subsequently access the app in the browser.
These are super annoying. I don’t want to turn off debug mode though. I would be fine with either solving the actual problem or just making it so those error messages go away (without making other error messages go away, as this is in a permanent state of development). I have tried a number of solutions from online to no avail.
The first error seems to cascade the rest, so focusing on that. It would seem the clear cache doesn’t just delete files, it may also be doing some packing or emptying out existing files. Those files when touched (or recreated) by the root account is getting its root access privileges only.
All I would do for now is issue a chmod command next in the cronjob which opens the security for those files/folder which you know are causing a problem. It would be smart to have a shell script which first does the cache purge then the chmod, so you know they are being executed in order, and have cronjob for that.