...

View Full Version : need help PLEASE READ



I_Love_Privacy
08-02-2008, 09:21 PM
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

my website is http://cynscriptz.com/

which is masking my real website name

http://mytestsite.net76.net/cynscriptz/buy/index.php

Any help appreciated

-------------------------------------------------------
This is the line that has the error



if (file_exists($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) {
this is the File That has the error



<?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: */

?>

oesxyl
08-02-2008, 09:43 PM
- read rule 2 from Posting Guidelines (http://www.codingforums.com/postguide.htm)
- read open_dirbase from this link:
http://www.php.net/manual/en/features.safe-mode.php

regards

I_Love_Privacy
08-02-2008, 09:48 PM
sorry for the messed up subject -------------------
--------------------------------------------------

How do i fix it im not good with php? i dont understand what im supposed to do with safemode command could you fix the piece of code and post it so it will work correctly?

oesxyl
08-02-2008, 10:01 PM
sorry for the messed up subject -------------------
--------------------------------------------------

How do i fix it im not good with php? i dont understand what im supposed to do with safemode command could you fix the piece of code and post it so it will work correctly?
the problem with subject is that people don't answer to something so general, that's all, :)

about error, I don't use smarty and I have no idea how could be fixed, probably something in setup, that's whay I post only the link, maybe could help you.

from manual:

Limit the files that can be opened by PHP to the specified directory-tree, including the file itself. This directive is NOT affected by whether Safe Mode is turned On or Off.
is not about safe mode, is about the rest of the description of open_dirbase.(Don't ask me why is open_basedir there? :))
I guess that you must check the value of open_dirbase, DIRECTORY_SEPARATOR, function parameters, anything related with this function( I talk about smarty_core ....), using echo or print/print_r for arrays, and change smarty setup to fix it.

sorry, but that's all I can do to help.

regards

I_Love_Privacy
08-02-2008, 10:02 PM
ok thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum