problem with shared compiled directory and duplicate file names

From: Date: Thu, 08 Aug 2002 15:59:44 +0000
Subject: problem with shared compiled directory and duplicate file names
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5698@lists.php.net to get a copy of this message
Hi, Versions 2.1 Os=redhat I'm using smarty for a product , but now I'm trying to put some security in. My problem is that there are several copies causing the following directory layout /public_html/product1 /public_html/product1/index.php /public_html/product1/smarty_templates /public_html/product1/smarty_templates/index.tpl /public_html/product2 /public_html/product2/index.php /public_html/product2/smarty_templates /public_html/product2/smarty_templates/index.tpl now if I set the compile_dir to ./smarty_template_comp it will create subdirectories under each product , but I must set the privs to 666 in order for smarty to create the directories and files. Chmod line doesn't work as its running in safe mode. To avoid having readable directories in the webarea (/public_html) tree , I set the compile_dir to /smarty_template_comp so that there would be no direct web access. However because the template file names are the same in each subdirectory (index.tpl) , it gets confused about which compiled template to use as it has only one compiled template. Quick solution would be to change the template names in each directory , but I think this could be a common issue for people with index.tpl all over the place , and with a common compile_directory thoughts/comments ? Ian

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