View previous topic :: View next topic |
Author |
Message |
-leliel- Smarty Rookie
Joined: 18 Apr 2003 Posts: 13
|
Posted: Tue Apr 22, 2003 12:39 pm Post subject: CHMOD of ./templates_c/ ? |
|
|
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 |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue Apr 22, 2003 12:46 pm Post subject: |
|
|
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 |
|
-leliel- Smarty Rookie
Joined: 18 Apr 2003 Posts: 13
|
Posted: Tue Apr 22, 2003 1:19 pm Post subject: |
|
|
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 |
|
-leliel- Smarty Rookie
Joined: 18 Apr 2003 Posts: 13
|
Posted: Wed Apr 23, 2003 12:04 pm Post subject: |
|
|
I tried chown and chmod ... nothin' works.
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 |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Apr 23, 2003 12:13 pm Post subject: |
|
|
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.
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 |
|
-leliel- Smarty Rookie
Joined: 18 Apr 2003 Posts: 13
|
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Apr 23, 2003 12:46 pm Post subject: |
|
|
/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 |
|
-leliel- Smarty Rookie
Joined: 18 Apr 2003 Posts: 13
|
Posted: Wed Apr 23, 2003 12:56 pm Post subject: |
|
|
thanks. I'll try it. |
|
Back to top |
|
|