Re: [SMARTY-DEV] cache problem 2.6.0RC1

From: Date: Mon, 01 Sep 2003 14:55:35 +0000
Subject: Re: [SMARTY-DEV] cache problem 2.6.0RC1
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1835@lists.php.net to get a copy of this message
there is a bug in libs/plugins/function.config_load.php in Smarty-2.6.0-RC1 . try the cvs-version . if you don't have a cvs-client you can get the latest function.config_load.php here: http://cvs.php.net/co.php/smarty/libs/plugins/function.config_load.php?login=2&r=1.14 or you have to wait for RC2. HTH messju On Sat, Aug 30, 2003 at 11:52:04AM +0200, Catalin Trifu wrote: > 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

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