Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting "PHP Warning: is_readable(): open_basedir restriction in effect." When uploading wordpress theme

Tags:

php

I am uploading a bought theme to wordpress but keep getting this error:

PHP Warning:  is_readable(): open_basedir restriction in effect. File(G:\localhost\root\website\wordpress/wp-content/plugins/G:/\localhost\root\website\wordpress/wp-content/themes/cacoon/inc/languages/portfolioposttype-en_US.mo) is not within the allowed path(s): (G:\localhost\root;C:\Windows\Temp\) in G:\\localhost\root\website\wordpress\wp-includes\l10n.php on line 457

The /root/website refers to the structure within the hosting account where i am hosting multiple sites within the same account ie. mainhostsite.com/otherSiteOnTheSameAccount.com

This is the statment on line 457:

if ( !is_readable( $mofile ) ) return false;

$mo = new MO();
if ( !$mo->import_from_file( $mofile ) ) return false;

if ( isset( $l10n[$domain] ) )
    $mo->merge_with( $l10n[$domain] );

$l10n[$domain] = &$mo;

return true;
}

Could anyone shed some light on what i need to do to fix this error? (Apologies if the way i have layed the question out is not the best, if someone could inform me on how to structure it properly it would be greatly appreciated.)

like image 552
Matthew Proctor Avatar asked Aug 22 '14 11:08

Matthew Proctor


1 Answers

I fixed it by setting none in open_basedir in the PHP settings of my plesk panel.

like image 67
Matthew Proctor Avatar answered Sep 21 '22 23:09

Matthew Proctor