Re: [SMARTY] safe mode on and use_sub_dirs

From: Date: Tue, 18 Nov 2003 20:58:33 +0000
Subject: Re: [SMARTY] safe mode on and use_sub_dirs
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10546@lists.php.net to get a copy of this message
On Tue, Nov 18, 2003 at 08:48:35PM +0100, B. van Ouwerkerk wrote: > At 19:24 18-11-2003 +0100, you wrote: > >On Tue, Nov 18, 2003 at 06:48:51PM +0100, B. van Ouwerkerk wrote: > >> When set safe mode to on and use_sub_dirs to true Smarty breaks, all I > >get > >> are many error messages. Accessrights are set correctly and with the same > >> settings I can create as much files as I want.. > > > >that's true. maybe read > >http://php.net/features.safe-mode why. > > I still fail to see why Smarty should be unable to create subdirs. I know I > can :-) I'll even create files in there if I like.. but you can not access them. safe_mode means you only can access files that reside in a directory owned by uid being the same as the owner of the script-file currently running. > I have installed Smarty under the UID of the user running the PHP files. > It's installed in the users homedir.. So.. imho nothing it stopping Smarty > from creating directories. > > I wonder why Smarty with use_sub_dirs = true tries to do something in: > /usr/local > /opt > /opt is the dir under which the userdir lives.. But Smarty should not write > there but in the userdir instead.. it traverses php's include_path if it cannot find things explicitely (like plugins or templates). under certain circumstances it also checks the full path from / to the directory in question if it is supposed to create a subdirectories. > >you have to set use_sub_dirs to true if you want to use smarty in > >safe_mode. AFAIK safe_mode is the main reason why use_sub_dirs was > >added. > > I see. All information I got so far points to setting it to false in order > to run Smarty. Like in Smarty.class.php "sub directories better organized, > but may not work well with PHP safe mode enabled". yes. > > B.

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