PHP函数给出了有效的open_basedir限制的错误

PHP函数给出了有效的open_basedir限制的错误,php,web-services,configuration,Php,Web Services,Configuration,我在我的免费服务器上安装了2.7,但是在登录后,我从一个ushuhidi文件中得到了这个错误: 我跟踪了ushahidi代码,发现这是导致问题的函数: /** * Get realpath with any trailing slash removed. If realpath() fails, * just remove the trailing slash. * * @param string $path * * @return mixed path with no tra

我在我的免费服务器上安装了2.7,但是在登录后,我从一个ushuhidi文件中得到了这个错误:

我跟踪了ushahidi代码,发现这是导致问题的函数:

/**
 * Get realpath with any trailing slash removed. If realpath() fails,
 * just remove the trailing slash.
 * 
 * @param string $path
 * 
 * @return mixed path with no trailing slash
 */
protected static function _realpath($path)
{
    $realPath = realpath($path);
    if ($realPath !== false) {
        $path = $realPath;
    }
    return rtrim($path, '/\\');
}
如果我注释掉函数的前4行,并且只保留return语句,那么它就工作了,但是我认为它可能会导致错误或其他问题,所以我不想通过注释掉这4行来解决问题

是否有一种方法可以重新编写此函数,使其执行相同的操作,而不会导致错误

注意:我主持的网站不允许用户更改
PHP
配置。


谢谢。

尝试在.htaccess文件中设置open\u basedir:

php_value open_basedir [[VALUE]]
尝试关闭open_basedir:

php_value open_basedir none