Re: [SMARTY] Problem when moving directories

Jochem Maas <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
Tony K. wrote:
> I have been developing a website using smarty on my local (linux)
> server.  It has been working OK so far. I have a file called setup.php
> which includes:
> 
> ***************************************************
> define('SMARTY_DIR', '/usr/share/php/smarty/libs/');
> require(SMARTY_DIR . 'Smarty.class.php');
> 
> class Smarty_Test extends Smarty {
> 
>   function Smarty_Website(){
> 
>        $this->Smarty();
>        $this->template_dir = '/var/www/html/foobar/public_html/templates';
>        $this->compile_dir  = 
> '/var/www/html/foobar/public_html/templates_c';
>        $this->config_dir   = '/var/www/html/foobar/public_html/configs';
>        $this->cache_dir   = '/var/www/html/foobar/public_html/cache';

I suggest you make the above self-determining or at least define a
constant like SMARTY_DIR in your config to point to the root of your
smarty data dirs.

>        $this->caching = true;
>        $this->assign('app_name', 'test');
>   }
> }
> ***************************************************
> 
> This file is required() by the index.php page.
> 
> However, when I tried moving all the directories (cache, config,
> template, template_c) and associated files except the index.php page

I assume that your not moving the files in cache and templates_c - I'd
let them be auto-regenerated.

the permissions, as someone else pointed out, is a good point to consider.

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.