Again : Smarty error: problem creating directory. did I found something ?
| From: | Christopher Rousseau | Date: | Thu, 08 Jan 2004 13:25:59 +0000 |
| Subject: | Again : Smarty error: problem creating directory. did I found something ? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-10782@lists.php.net to get a copy of this message | ||
I did use today a sharing hosting company to host a small web site.
As usual I'm using smarty for it.
I encounter the now well know "Smarty error: problem creating directory
'/home' in /home/seafarii1/Smarty-2.6.0/libs/Smarty.class.php"
After some test and look on the previous mail in this liste I did try
the $smarty->use_sub_dirs=false; option and it did work.
But I was not happy, my site use cache with cache_id and I prefer to use
sub dir than put many files in the same directory
I did look inside the "smarty_core_create_dir_structure" function and
found a possible problem:
On line 19 we found this line:
$_open_basedir_ini = ini_get('open_basedir');
It seams that the create_dir function remove all directory found in
open_basedir before trying to create the new structure.
On my hosting php server, this parameter is not set at all. So smarty
try to create the full directory where my compile file are stored
And failed creating the first one: "/home" because I have not the right
to write inside the root directory (even if this /home directory already
exist???).
I have modified the smarty_core_create_dir_structure to force the
$_open_basedir_ini variable to be my root directory (in my exemple :
/home/seafarii1/) and it work now, but it's ugly :-).
I don't know if somebody did work on it already and how to solve
definitively this problem in the proper way.
I'm at the disposition of Messju or anybody else who want to look upon
it to provide more information if needed :-)
Christopher Rousseau