Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

CHMOD of ./templates_c/ ?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
-leliel-
Smarty Rookie


Joined: 18 Apr 2003
Posts: 13

PostPosted: Tue Apr 22, 2003 12:39 pm    Post subject: CHMOD of ./templates_c/ ? Reply with quote

Hi,

I've uploaded my page yesterday and all works fine.
After uploading and viewing there was a little update. The templates doesn't change, so I deleted the contents of the ./templates_c directory.

If I want to view the site now, smarty tells me, the folders in ./templates_c could not be created (see http://www.kayakclub-landau.de).

CHMOD of the templates_c dir is 0777.

PHP version is 4.0.6 ... there's an update to the actual version tonight.

any suggestions?
Back to top
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Tue Apr 22, 2003 12:46 pm    Post subject: Reply with quote

maybe your site is running in php safe_mode, then you should set $smarty->use_sub_dirs = false

also: ./templates_c is relative to the index.php
maybe this is wrong in your setup. it is safest to set $smarty->compile_dir to the absolute-path to your templates_c.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
-leliel-
Smarty Rookie


Joined: 18 Apr 2003
Posts: 13

PostPosted: Tue Apr 22, 2003 1:19 pm    Post subject: Reply with quote

No, my ISP turned safe mode off because of the forum running on the page. The path should be right, too.
But, as safe-mode was on, all works fine. So, I called my 'ISP' to turn safe-mode on.
Back to top
View user's profile Send private message Visit poster's website
-leliel-
Smarty Rookie


Joined: 18 Apr 2003
Posts: 13

PostPosted: Wed Apr 23, 2003 12:04 pm    Post subject: Reply with quote

I tried chown and chmod ... nothin' works. Sad

Quote:
Warning: unable to create file ./templates_c//%%-13/%%-135052920/header.tpl.php because No such file or directory in /home/www/web13/html/asv/libs/Smarty.class.php on line 1575

Warning: Failed opening './templates_c//%%-13/%%-135052920/header.tpl.php' for inclusion (include_path='.:/usr/share/php') in /home/www/web13/html/asv/libs/Smarty.class.php on line 1158

Warning: unable to create file ./templates_c//%%-20/%%-2015117867/panel_menu.tpl.php because No such file or directory in /home/www/web13/html/asv/libs/Smarty.class.php on line 1575
Back to top
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Apr 23, 2003 12:13 pm    Post subject: Reply with quote

again:

i would try to set $smarty->compile_dir to an absolute path.
this is always the best and most robust, i think.

you can do sth. like. $smarty->compile_dir = realpath(dirname(__FILE__)). DIR_SEP.'templates_c';
then it is fully portable to the next server, but you
get the absolute path in your error-message, which is much better to further investigate this. Smile

second: use $smarty->use_sub_dirs = false to get things going. you avoid loads of problems by this. if everything
works fine you can turn it back on eventually.

greetings
messju
Back to top
View user's profile Send private message Send e-mail Visit poster's website
-leliel-
Smarty Rookie


Joined: 18 Apr 2003
Posts: 13

PostPosted: Wed Apr 23, 2003 12:24 pm    Post subject: Reply with quote

so i have to use

/home/www/web13/html/asv/templates_c

as the absolute path? or http://kayakclub-landau.de/templates_c ?
Back to top
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Apr 23, 2003 12:46 pm    Post subject: Reply with quote

/home/www/web13/html/asv/templates_c
smarty always uses files internally and never urls.

you may be best of moving templates_c to
/home/www/web13/templates_c (and configure it accordingly)
then your compiled templates cannot be accessed by the
outside, but only by smarty itself. this is enough to operate with them, since they never need to be called directly, and raises security. maybe your templates have unwanted side-effects if they are called directly. this is unlikely but possible so you are on the safe side if you lock them away.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
-leliel-
Smarty Rookie


Joined: 18 Apr 2003
Posts: 13

PostPosted: Wed Apr 23, 2003 12:56 pm    Post subject: Reply with quote

thanks. I'll try it.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP