I keep Getting This Error on my site but i dont know what it means Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/lib/php/./templates/tmpl1//./templates/tmpl1/index.tpl.html) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a2438169/public_html/cynscriptz/buy/smarty/core/core.get_include_path.php on line 34 Click The Link in my sig Below to see website Any help apreciated
No because that is the MAIN template file i tried removing it and all it did was make the page go blank
file_exists() is meant to PREVENT these errors. It'll return TRUE if the file exists, and FALSE if not. And I don't think you ever read the error message, did you? Read this: http://www.php.net/features.safe-mode#ini.open-basedir
i am a little confused on how to fix? do i have to use the chdir() command instead of open_basedir This is the File that is Erroring: <?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Get path to file from include_path * * @param string $file_path * @param string $new_file_path * @return boolean * @staticvar array|null */ // $file_path, &$new_file_path function smarty_core_get_include_path(&$params, &$smarty) { static $_path_array = null; if(!isset($_path_array)) { $_ini_include_path = ini_get('include_path'); if(strstr($_ini_include_path,';')) { // windows pathnames $_path_array = explode(';',$_ini_include_path); } else { $_path_array = explode(':',$_ini_include_path); } } foreach ($_path_array as $_include_path) { if (file_exists($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) { $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path']; return true; } } return false; } /* vim: set expandtab: */ ?> PHP:
this is the Line of code that it says is erroring if (file_exists($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) { PHP:
this cant be proper paths: /usr/local/lib/php/./templates/tmpl1//./templates/tmpl1/index.tpl.html login and ls /usr/local/lib/php/./templates/tmpl1//./templates/tmpl1/index.tpl.html see if it returns anything which i dont think it will, there is a problem with permissions. Other wise your path settings are off and will need to set proper path. locate the file and the command pwd will output the path you are in (commands are assuming this is a linux/bsd machine)