Re: [SMARTY] folder names in templates_c
| From: | Øystein Gisnås | Date: | Sun, 20 Oct 2002 13:31:05 +0000 |
| Subject: | Re: [SMARTY] folder names in templates_c | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6200@lists.php.net to get a copy of this message | ||
> The folders in my templates_c folder have all names that begin
> with "%%", which is quite a problem for me as I only have FTP
> access to the site, and I haven't found a way to work with them
> in any way. No listings, no rename, no remove.
>
> Is this a normal behaviour of Smarty? Or have I forgotten to
> configure anything? Any suggestions as how I could get
> rid of those folders again?
The template cache files, are created by the user which Apache is run as,
usually httpd. You won't be able to do anything with the files since you
are not the owner.
One solution might be to store the template_c directory in a temp
directory or something, but this is what I do:
All php-scripts are run as the same user (usually httpd). Why don't you
inspect/delete the files through a php-script?
A simple example:
<?php
system('rm -r /path_to_smarty/templates_c/* 2> error.log');
?>
Where "2> error.log" redirects stdandard error to a file. (Won't be
displayed otherwise)
Øystein Gisnås