Re: [SMARTY] cache cron job

From: Date: Wed, 19 Feb 2003 15:30:14 +0000
Subject: Re: [SMARTY] cache cron job
References: 1 2 3 4  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7888@lists.php.net to get a copy of this message
messju mohr wrote:
On Wed, Feb 19, 2003 at 09:29:05AM -0500, Paul Lockaby wrote:
Hi, Thank you for the suggestion. I tried it out on a test machine and needed root access to execute all of the commands, and then when I was done, I still couldn't do anything with the files as user paul.
1. sorry, i intermixed templates_c and cache i think. but with the cache- directory it should work the same. 2. you have to delete all the old cache-files that belonged to group nobody, before. only newly created files have the correct permissions/ ownership. 3. you also have to set "umask(0002);" in your php-file that creates the files. sorry, i think i overlooked that, too.
Anyone have any different suggestions? Seriously, how do you people run scripts to clear out the cache/compile directories?
serously, sometimes the way i suggested above. but more often with $smarty->clear_cache() . i don't insist in *not* running a php-script for that task. i think smarty is the one who created the cache-files and so it is the one who knows best, how to get rid of them. HTH messju
Huzzah, this worked when I added the umask in. As Mark Rogers mentioned, I could have a PHP file that periodically gets run, but I'm timid to do that because that is just security by obscurity. What is to stop someone from abitrarily running that file? However, I primarly I want to put the cache clearing responsibilities into a Perl script that already runs to update other aspects of my site. Thank you all for your help. This will work. ~Paul

« previous php.smarty.general (#7888) next »