Re: [SMARTY] Problem with compile_dir
| From: | messju mohr | Date: | Fri, 30 May 2003 22:51:18 +0000 |
| Subject: | Re: [SMARTY] Problem with compile_dir | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9618@lists.php.net to get a copy of this message | ||
On Fri, May 30, 2003 at 09:00:57PM +0200, Ilic Aleksandar wrote:
> Hi,
> This is my first problem with smarty I can't handle with my self. I haven't
> start to read source of smarty yet, but if I don't solve this I'll have to do
> that:(( to try ton solve that on that way. Any way, here is my problem.
> Smarty just can't see my template_c directory in some cases. I am developing
> under Win 2K server, and using Apache-1.3.x and php-4.3.0 and Smarty-2.5.0.
> If I set up $smarty->compile_dir, that all compiled templates are saved under
> root directory of my partition, otherwise if I don't set it up in most cases,
> everything is OK.
>
> Here is my config file
>
> $basePath = "F:/Inetpub/wwwroot/cms/";
>
> require_once ($basePath . "functions/various.inc");
>
> define('SMARTY_DIR', $basePath);
>
> require_once (SMARTY_DIR . "Smarty.class.php");
> $smarty = new Smarty;
> $smarty->compile_check = true;
> //$smarty->debugging = true;
> $smarty->debugging = false;
> $smarty->template_dir = $basePath . "templates/";
> $smarty->compile_dir = $basePath . "template_c/";
> $smarty->config_dir = $basePath . "configs/";
> $smarty->cache_dir = $basePath . "cashe/";
>
>
> My application is in F:/Inetpub/wwwroot/cms/ directory. If I don't set compile_c
> it is working OK unless php script is more than one directory deep. Like in
> F:/Inetpub/wwwroot/cms/content/main/
> In that case, compiled templates are again directly under F:
if you don't set $smarty->compile_dir 'templates_c' relative to the
current working directory is used. if you say, this works on
top-level, it seems to me your line above should read
$smarty->compile_dir = $basePath . "templates_c/";
instead of
$smarty->compile_dir = $basePath . "template_c/";
HTH
messju
> This is begining of var_dump($smarty) in case when compile is seted
>
> object(smarty)(55) {
> ["template_dir"]=>
> string(37) "F:/Inetpub/wwwroot/pellady/templates/"
> ["compile_dir"]=>
> string(38) "F:/Inetpub/wwwroot/pellady/template_c/"
> ["config_dir"]=>
> string(35) "F:/Inetpub/wwwroot/pellady/configs/"
> ["plugins_dir"]=>
> array(1) {
> [0]=>
> string(7) "plugins"
> }
> ["debugging"]=>
> bool(false)
> ["debug_tpl"]=>
> string(0) ""
> ["debugging_ctrl"]=>
> string(4) "NONE"
> ["compile_check"]=>
> bool(true)
> ["force_compile"]=>
> bool(false)
> ["caching"]=>
> int(0)
> ["cache_dir"]=>
> string(33) "F:/Inetpub/wwwroot/pellady/cashe/"
>
>
>
> The biggest mistery for me that I just copy these setings from my other Smarty
> project , and everything is working perfectly there.
>
> Thnx for any help
> Ilic Aleksandar
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php