Solusi zend warning: is_readable(): open_basedir restriction in effect.

Jika menemukan error zend warning: is_readable(): open_basedir restriction in effect. maka solusinya adalah dengan merubah kode terkait.

public static function isReadable($filename)
{
if (is_readable($filename)) {
// Return early if the filename is readable without needing the
// include_path
return true;
}

//added the if, basically to skip any absolute filename path
if(!is_readable(dirname($filename)))
foreach (self::explodeIncludePath() as $path) {
if ($path == ‘.’) {
if (is_readable($filename)) {
return true;
}
continue;
}
$file = $path . ‘/’ . $filename;
if (is_readable($file)) {
return true;
}
}

return false;
}

 

Seketika error tersebut pun hilang…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s