[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-dev
Subject:    [SMARTY-DEV] cache problem 2.6.0RC1
From:       213.23.18.158
Date:       2003-08-30 9:52:04
[Download RAW message or body]

        Hi,

    I have the following dir setup:

DOC_ROOT/
    cache/
    cfg/
    templates/
    templates_c/

this is how smarty is set up:
class Smarty_DatingBase extends Smarty {
    function Smarty_DatingBase() {
        $this->Smarty();

        $this->template_dir = DATING_TPL;//DOC_ROOT/templates
        $this->compile_dir = DATING_TPL_C;//DOC_ROOT/templates_c
        $this->config_dir = DATING_CFG;//DOC_ROOT/cfg
        $this->cache_dir = DATING_CACHE;//DOC_ROOT/cache

        $this->caching = true;//as you can see i set up caching
        $this->caching_lifetime = 60 * 60;//one hour caching
        $this->assign('page_sub_title', 'Home Page');
    }
}//class Smarty_DatingBase

With a completely fresh started server, (no cache, no compiled templates),
I get this error:

 Error: Undefined index: vars [8] | File:
d:\cvs\DATING\dating-php\include\libs\smarty\Config_File.class.php, Line:
135
Context:
Array
(
    [this] => config_file Object
        (
            [overwrite] => 1
            [booleanize] => 1
            [read_hidden] =>
            [fix_newlines] => 1
            [_config_path] => d:\cvs\DATING\dating-php\cfg\
            [_config_data] => Array
                (
                    [d:\cvs\DATING\dating-php\cfg\base.conf] => Array
                        (
                            [sections] => Array
                                (
                                    [Main] => Array
                                        (
                                            [vars] => Array
                                                (
                                                    [site_title] =>
dating-tv.de
                                                    [pr_email] =>
pr@dating-tv.de
                                                    [main_table_width] =>
1024
                                                    [main_table_align] =>
center
                                                    [company_name] =>
Dating-TV.de, GmbH
                                                )

                                        )

                                )

                        )

                )

            [set_path] => d:\cvs\DATING\dating-php\cfg
        )

    [file_name] => d:\cvs\DATING\dating-php\cfg\base.conf
    [section_name] =>
    [var_name] =>
)

    The funny part is that I load the _section Main_ from _base.conf_ file
from the header.tpl
with the _scope_ set to _global_
    But when I try to display _index.tpl_ which first includes header.tpl I
receive what you saw.
    And another funny thing is, that when I don't use caching it works like
a charm.
    However, when using caching, on the second hit on the page I get a
different error:

 Error: Smarty error: unable to read resource: "base.conf" [512] | File:
d:\cvs\DATING\dating-php\include\libs\smarty\Smarty.class.php, Line: 1156

    Please tell me if I should shoot myself, since I'm too damn to see what
I'm doing wrong, or if you have any ideas, please share them.


Thank you,
Catalin

P.S.
    Sorry for such a big message. If you reached this place
it means you beared a lot. thx!

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic