Re: [SMARTY-DEV] relative path and open_basedir problem

From: Date: Sat, 05 Apr 2003 14:28:44 +0000
Subject: Re: [SMARTY-DEV] relative path and open_basedir problem
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1103@lists.php.net to get a copy of this message
This was my solution too. It would be helpful to change Smarty.class.php or to find this "solution" in the documentation. At the moment there is no advice regarding to relative path. Torsten Zachert - teserco - "Messju Mohr" <messju@lammfellpuschen.de> schrieb im Newsbeitrag news:20030405071426.GU21673@pharao.lammfellpuschen.de... > On Fri, Apr 04, 2003 at 10:52:08PM +0200, Torsten Zachert wrote: > > (if I use an absolute path it works fine -->> no chmod problem !!) > > > > I am using smarty with the following configuration on linux os > > > > $tpl->compile_dir = 'smarty/templates_c'; //relative path !! > > what about > $tpl->compile_dir = realpath('smarty/templates_c'); //absolute path !! > > ? > > > > usage of "open_basedir" > > > > and I receive: > > > > Warning: Smarty error: problem writing > > './smarty/templates_c/%%-91/%%-914269518/newsticker.tpl.php.' > > > > because of a problem in: > > > > Smarty.class.php -> function _create_dir_structure($dir) > > > > $_make_new_dir > > is every time false because of the loop > > > > foreach ($_open_basedirs as $_open_basedir) { > > > > } > > > > where the if clause: > > > > if (substr($_new_dir.'/', 0, strlen($_open_basedir)) == $_open_basedir) > > > > never is true > > > > $_new_dir contains the relative path and > > $_open_basedir contains the absolute path > > > > Is this really a problem? Is it possible to fix it in the next version? > > > > Torsten Zachert > > - teserco - > > > > > > > > -- > > Smarty Development Mailing List (http://smarty.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > Fernschach: GUI auf 386/8 MB > nach Frank Klemm

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