SafeMode with Smarty 2.5.0

From: Date: Fri, 18 Apr 2003 14:33:01 +0000
Subject: SafeMode with Smarty 2.5.0
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9324@lists.php.net to get a copy of this message
Hello Everyone, I'm having a problem using Smarty 2.5.0 with Safemode with PHP, I was initially using 2.4.2 and upgraded to 2.5.0 in the hopes it might resolve my problem. A page containing phpinfo() can be accesse at http://www.boisesbest.com/phpinfo.php I have configured smarty with the following: $smarty = new Smarty; $smarty->plugins_dir = constant('BASE_INCLUDE_PATH') . '/smarty/plugins'; $smarty->template_dir = constant('BASE_INCLUDE_PATH') . '/templates/templates'; $smarty->compile_dir = constant('BASE_INCLUDE_PATH') . '/templates/compile'; $smarty->config_dir = constant('BASE_INCLUDE_PATH') . '/templates/config'; $smarty->cache_dir = constant('BASE_INCLUDE_PATH') . '/templates/cache'; The configuration works on my machine at home (Windows and Linux) with safe mode disabled. When I upload it to the site that has PHP 4.3.1 It fails to work, I receive the following messages: *Warning*: file_exists() [function.file-exists <http://www.php.net/function.file-exists>]: SAFE MODE Restriction in effect. The script whose uid is 5252 is not allowed to access /soho owned by uid 0 in */soho/boisesbest.com/ftproot/webroot/bb/include/smarty/libs/Smarty.class.php* on line *2251* *Warning*: Smarty error: problem creating directory "/soho/boisesbest.com/ftproot/webroot/bb/include/templates/compile/%%117/%%1172603085" in */soho/boisesbest.com/ftproot/webroot/bb/include/smarty/libs/Smarty.class.php* on line *1042* *Warning*: Smarty error: problem writing temporary file '/soho/boisesbest.com/ftproot/webroot/bb/include/templates/compile/%%117/%%1172603085/3ea00a794a2a8' in */soho/boisesbest.com/ftproot/webroot/bb/include/smarty/libs/Smarty.class.php* on line *1042* *Warning*: touch() [function.touch <http://www.php.net/function.touch>]: Unable to create file /soho/boisesbest.com/ftproot/webroot/bb/include/templates/compile/%%117/%%1172603085/index.tpl.php because No such file or directory in */soho/boisesbest.com/ftproot/webroot/bb/include/smarty/libs/Smarty.class.php* on line *1575* *Warning*: fetch() [function.fetch <http://www.php.net/function.fetch>]: Unable to access /soho/boisesbest.com/ftproot/webroot/bb/include/templates/compile/%%117/%%1172603085/index.tpl.php in */soho/boisesbest.com/ftproot/webroot/bb/include/smarty/libs/Smarty.class.php* on line *1158* *Warning*: fetch(/soho/boisesbest.com/ftproot/webroot/bb/include/templates/compile/%%117/%%1172603085/index.tpl.php) [function.fetch <http://www.php.net/function.fetch>]: failed to create stream: No such file or directory in */soho/boisesbest.com/ftproot/webroot/bb/include/smarty/libs/Smarty.class.php* on line *1158* *Warning*: fetch() [function.fetch <http://www.php.net/function.fetch>]: Failed opening '/soho/boisesbest.com/ftproot/webroot/bb/include/templates/compile/%%117/%%1172603085/index.tpl.php' for inclusion (include_path='') in */soho/boisesbest.com/ftproot/webroot/bb/include/smarty/libs/Smarty.class.php* on line *1158 * I have chmodded the compile directory 777 but it fails to work. Any help is greatly appreciated. Jason

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