Re: [SMARTY] templates_c
| From: | Wilhelm Kutting | Date: | Tue, 24 Jun 2003 19:59:44 +0000 |
| Subject: | Re: [SMARTY] templates_c | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9772@lists.php.net to get a copy of this message | ||
What i am trying to do is i.e. to put the templates_c tree under
/var/cache.
That seems to me a better Linuxconform place for it.
Do I run into trouble if a lot of webservers use this dir too?
But I seem to run into trouble too when I put the template_c somewhere
else than the webserver also with the the dirs to the ownership of the
apache-user?
In article <20030624125921.GF3767@pharao.lammfellpuschen.de>,
messju@lammfellpuschen.de says...
> On Tue, Jun 24, 2003 at 02:05:11PM +0200, Wilhelm Kutting wrote:
> > hi,
> > i do not know where is the best way to config the path of templates_c
> > and the cache dir on a linux system.
>
> (i don't know if i understand your question 100%, but anyway:)
>
> there are two common ways:
>
> $smarty = new Smarty();
> $smarty->compile_dir = ...
>
>
> or
>
> class My_Smarty extends Smarty {
> function My_Smarty() {
> $this->Smarty();
> $this->compile_dir = ...
> }
> }
> $smarty = new My_Smarty;
>
>
>
> i normally use the former in a config.php that is included by all
> php-files that are exposed to the web.
>
> as a starter:
>
> the vague directory-layout of BASEDIR:
> /config.php
> /html/ <- this is the servers document-root
> /html/index.php
> /html/images/
> /html/...
> /lib/smarty/ <-- smarty's libs/directory
> /lib/smarty/Smarty.class.php
> /lib/smarty/plugins/... <-- smartys distribution's plugins
> /lib/... <- other third party stuff
> /templates/ <- guess :)
> /php/ <- other php-stuff, that can be invisible via http
> /php/plugins/ <- application-specific plugins
> /phptmp/ <- stuff where the webserver wants to write into
> /phptmp/templates_c/
> /phptmp/cache/
> /phptmp/sessions/
> ...
>
>