web services - PHP function giving error about open_basedir restriction in effect -
i installed ushahidi 2.7 on www.000webhost.com free server, after logging in got error 1 of ushuhidi files:

i tracked down ushahidi code, , found function causing problem:
/** * realpath trailing slash removed. if realpath() fails, * remove trailing slash. * * @param string $path * * @return mixed path no trailing slash */ protected static function _realpath($path) { $realpath = realpath($path); if ($realpath !== false) { $path = $realpath; } return rtrim($path, '/\\'); } if comment out first 4 lines of function, , keep return statement there, works, think can cause bug or don't want fix problem commenting out 4 lines.
is there way function can re-written same thing, , not cause error?
note: website hosting on doesn't allow users change php configuration.
thanks.
try set open_basedir in .htaccess file:
php_value open_basedir [[value]] try switch off open_basedir:
php_value open_basedir none
Comments
Post a Comment