cache problem 2.6.0RC1

From: Date: Sat, 30 Aug 2003 09:52:04 +0000
Subject: cache problem 2.6.0RC1
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1829@lists.php.net to get a copy of this message
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!

« previous php.smarty.dev (#1829) next »