relative path and open_basedir problem
| From: | Torsten Zachert | Date: | Fri, 04 Apr 2003 20:52:08 +0000 |
| Subject: | relative path and open_basedir problem | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-1082@lists.php.net to get a copy of this message | ||
(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 !!
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 -