Re:RE: The problem with Smarty

From: Date: Sun, 17 Feb 2002 21:23:21 +0000
Subject: Re:RE: The problem with Smarty
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2711@lists.php.net to get a copy of this message
I don't think the cache and config directories are required if you don't use them. I just ran a test, I did not create the cache or config directories and the test ran just fine with no errors. By default, the config_dir is set to "./configs" which shouldn't be used unless you call {config_load ...} in your template. If you do call {config_load ...} and there is no "./configs" directory located in the same directory as the executed script, then you will see this error. > -----Original Message----- > From: Peter Bowyer [mailto:reywob@f2s.com] > Sent: Sunday, February 17, 2002 2:54 PM > To: Monte Ohrt; smarty@lists.ispi.net > Subject: Re: [smarty] Re:RE: The problem with Smarty > > > At 02:02 PM 2/17/02 -0600, Monte Ohrt wrote: > >The quickstart guide is meant to be detailed enough to make installation > >easy. Is it not? > > No, I don't think it's as easy as it could be. I think sometimes > you forget > that we are not all PHP Gods like yourself and Andrei :-) > > Take this problem that is not addressed in the docs. When installing > Smarty, do I always have to create the configs and cache directories even > if I don't use these features? I have tried it both ways, and unless I > create a directory and define the path in my subclass, it throws the > following error: > Config_File: Bad config file path './configs' Config_File: Bad > config file > path './configs' > > Why is this? Ithought the default path in Smarty.class.php > should be used > as it's not re-defined in the subclass, so what's causing the > error? This > is a totally unmodified installation of Smarty 1.5.2 initialised > using the > subclass. Does it mean that the config class is being initialised? > > For those who are interested this was the only version of Monte's > subclass > that I could get to work - without the constructor it threw an error: > > <?php > require_once SMARTY_DIR . 'Smarty.class.php'; > > class NgSmarty extends Smarty > { > function NgSmarty() > { > // setup Smarty configs for your app > $this->template_dir = SMARTY_TEMPLATE_DIR; > $this->compile_dir = SMARTY_COMPILE_DIR; > //$this->config_dir = ; > $this->cache_dir = SMARTY_CACHE_DIR; > //$this->caching=true; > // call constructor > $this->Smarty(); > } > } > ?> > > Regards, > Peter. > > --oOo-- > Narrow Gauge on the web - photos, directory and forums! > http://www.narrow-gauge.co.uk > --oOo-- > Glenbranter - Scottish narrow gauge in 009 > http://glenbranter.narrow-gauge.co.uk > --oOo-- >

« previous php.smarty.general (#2711) next »