• Resolved jmoen

    (@jmoen)


    Host is GoDaddy Economy Windows with Plesk, IIS 8. Installed PayPal WP Button Manager version 1.0.3. During activation, I got:

    PHP Warning: is_readable(): open_basedir restriction in effect. File(G:\PleskVhosts\mydomain.com\httpdocs\wordpress/wp-content/plugins/https://www.mydomain.com/wordpress/wp-content/plugins/paypal-wp-button-manager//languages/paypal-wp-button-manager-en_US.mo) is not within the allowed path(s): (G:/PleskVhosts//mydomain.com\;C:\Windows\Temp\) in G:\PleskVhosts\mydomain.com\httpdocs\wordpress\wp-includes\l10n.php on line 583

    That line of code is: if ( !is_readable( $mofile ) ) return false;

    Somehow this plugin results in a bad filename being tested in l110.php. Notice the out of bounds filename is not valid and seems to have a URL in it — G:\PleskVhosts\mydomain.com\httpdocs\wordpress/wp-content/plugins/https://www.mydomain.com/wordpress/wp-content/plugins/paypal-wp-button-manager//languages/paypal-wp-button-manager-en_US.mo

    WordPress works fine, with other plugins, but crashes when trying to activate this plugin.

    Any ideas?

    • This topic was modified 7 years, 10 months ago by jmoen.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor angelleye

    (@angelleye)

    As the warning says there seems to be a restriction in place on the use of that function. You’re going to need to get that fixed on the web server so the limitation is removed and that should resolve your issue. Please give that a try and let me know if you still have issues after removing such limitations.

    Thread Starter jmoen

    (@jmoen)

    The error message says the file raising the error is G:\PleskVhosts\mydomain.com\httpdocs\wordpress/wp-content/plugins/https://www.mydomain.com/wordpress/wp-content/plugins/paypal-wp-button-manager//languages/paypal-wp-button-manager-en_US.mo

    Those are good directory names through wp-content/plugins/, but starting with http, of course the path is not valid. There is no directory under plugins called https://www…. So the error message is valid.

    The problem is, with this plugin installed, an invalid path somehow is being used. Removing this plugin’s files from wp-content/plugins fixes the problem.

    The key lines in l10n.php are:
    $mofile = apply_filters( ‘load_textdomain_mofile’, $mofile, $domain );
    if ( !is_readable( $mofile ) ) return false;

    Can you guess why this plugin is causing l10n.php to try to access a bad path? Or am I mis-reading the error message?

    Plugin Contributor angelleye

    (@angelleye)

    We don’t have any other reports of this and I’ve never seen it on any of my own test sites or live sites. The error you posted says there is a restriction on the is_readable() function. That seems to be the root of the problem, and you’ll need to contact your server admin / hosting provider for help fixing that.

    Thread Starter jmoen

    (@jmoen)

    Thanks for your quick replies. I was thrown off by the PHP error message. It gave the full path of the file that it said “is not within the allowed path(s)”, except it was in the allowed path. That made me reluctant to remove the open_basedir restriction. Turns out the real problem was the lower part of the path was invalid. So the error message was misleading. PHP giving a misleading error message? Who knew?

    Anyway, once I realized that, I knew the error message was bogus, so I took your advice and shut off the open_basedir restriction, and of course your plugin activated first try.

    Again, thanks for your responses and suggestion.

    Plugin Contributor angelleye

    (@angelleye)

    Glad to hear you got it worked out! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP open-basedir restriction error while activating PayPal WP Button Manager’ is closed to new replies.