Re: [SMARTY-DEV] Request for Discussion: use_sub_dirs' default value

From: Date: Fri, 30 Jan 2004 09:52:13 +0000
Subject: Re: [SMARTY-DEV] Request for Discussion: use_sub_dirs' default value
References: 1 2 3  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2084@lists.php.net to get a copy of this message
----- Original Message ----- From: "messju mohr" <messju@lammfellpuschen.de> To: "Armand Turpel" <armand@a-tu.net> Cc: <smarty-dev@lists.php.net> Sent: Friday, January 30, 2004 10:27 AM Subject: Re: [SMARTY-DEV] Request for Discussion: use_sub_dirs' default value > On Fri, Jan 30, 2004 at 10:21:01AM +0100, Armand Turpel wrote: > > On Friday 30 January 2004 09:38, messju mohr wrote: > > > Hello, > > > > > > I often stumble over people who stumble over problems when it comes to > > > handling the templates_c-folder: Files can not be created (because of > > > safe_mode-restrictions) or files cannot be deleted (because there is > > > only ftp-access as a different user than the webserver is). > > > > I have often problems like this on shared servers which are misconfigured. It > > works only when every thing is on 0777 which should be not the case. Most > > webservers run under the user nobody and group nobody. Some ftp servers > > change the file rights while upload to user "userxxxx" group "nobody". The > > webserver should run php scripts under this rights. In this case there is no > > poblem to delete all files created by php scripts. > > Schlund+Partner in Germany does it this way, for example. I think most > shared servrs don't do it, because it costs more resources to run a > suexec'ed php (as cgi) than to run a mod_php as nobody. And > resources==money for hosting companies. > I host my projects on domainfactory shared servers in germany. They run php as cgi and it works perfect. Never had any problem. > > > These problems are easy to solve for experienced users, but hard for > > > beginners. I think the speed benefit of use_sub_dirs=true > > > vs. use_sub_dirs=false is only measurable when a huge number of > > > templates is used (maybe caused by a database-resource) or when > > > caching with a reasonable number of cache_ids is done. IMHO, these two > > > are advanced uses of smarty and people who do things like that can be > > > expected to turn use_sub_dirs on explicitely. > > > > > > Shouldn't Smarty come with $use_sub_dirs=false as default? > > > > > > I never understand why this feature is disabled on some servers? Where is the > > security problem to create subfolders from withhin php? > > PHP wants you to prevent you from writing in the templates_c-folder of > your neighbour who is on the same shared host. Since both run as > nobody the crutch called "safe_mode" was invented. Many thanks!

« previous php.smarty.dev (#2084) next »