Subscribe2 Version 8.9.1 error
-
After upgrade to Version 8.9.1 I get the following error on all site pages. Any idea on what file to make the code correction?
Thanks!
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(D:\Inetpub\cross/wp-content/plugins/D:\Inetpub\cross/wp-content/languages/subscribe2-en_US.mo) is not within the allowed path(s): (D:\;C:\php5;C:\Temp;C:\Windows\Temp) in D:\Inetpub\cross\wp-includes\l10n.php on line 339
-
I used your earlier advice below and the plugin loads.
Thanks!
—————–
In the wp-content/plugins/subscribe2/classes folder you’ll find a file called class-s2-core.php, edit that and find these 2 lines:
add_action(‘init’, array(&$this, ‘load_translations’), 5);
add_action(‘init’, array(&$this, ‘load_strings’));And comment them out by putting // at the start of the line.
Then in the __construct() function a little further down add these two lines:
$this->load_translations();
$this->load_strings();I’m glad you got that fixed. The next version actually loads those functions on the ‘plugins_loaded’ hook rather than ‘init’ like this:
add_action('init', array(&$this, 'load_translations'), 5); add_action('init', array(&$this, 'load_strings'));Hi Matt,
It turns out that commenting out those lines did not work (subscribe form error and emails not sending)
So I did a fresh install and get the below error again.
Is there a recommended workaround?
Thanks,
BobWarning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(D:\Inetpub\crossfitgreatbarrington/wp-content/plugins/D:\Inetpub\crossfitgreatbarrington/wp-content/languages/subscribe2-en_US.mo) is not within the allowed path(s): (D:\;C:\php5;C:\Temp;C:\Windows\Temp) in D:\Inetpub\crossfitgreatbarrington\wp-includes\l10n.php on line 339
This issue isn’t going to be plugin specific I don’t think as it’s related to restricted access of the web process to certain folders on your server.
You need to edit the PHP configuration (or have the hosting provider look at that for you. These may help:
http://forum.parallels.com/showthread.php?258036-Plesk-Windows-open_basedir-restriction-in-effect
http://stackoverflow.com/questions/3257090/php-directory-error-open-basedir-restriction-in-effect
Matt,
Thanks for the quick reply – I’ll check out!
Thanks,
BobHi,
We are experiencing the same problem obviously with differing paths for our setup. Is this not because there are two paths being concatenated and therefore unreachable. i.e from the example above
D:\Inetpub\cross/wp-content/plugins/D:\Inetpub\cross/wp-content/languages/subscribe2-en_US.mo
Probably becoming:
D:\Inetpub\cross/wp-content/plugins/Dwhich would not exist?
Best Regards
JustinSubscribe2 makes 3 calls to potential locations for the i18n files in a function in the classes/class-s2-core.php file:
function load_translations() { load_plugin_textdomain('subscribe2', false, S2DIR); load_plugin_textdomain('subscribe2', false, S2DIR . "languages/"); load_plugin_textdomain('subscribe2', false, WP_LANG_DIR . "/"); } // end load_translations()Try commenting out the 2 locations where you have not got a file and see if that makes any difference.
Sadly, I am unable to check as I don’t have access to any hosting on the Windows platform.
@bob / Justin,
I’ve just had a look at the code in the load_plugin_textdomain() function in WordPress – it appears that the necessary trailing slash is added in there but my code is duplicating this.
I’m not sure if this is the reason but I think it’s worth a look. In the classes/class-s2-core.php file find the load_translations() function at the top of the file and replace it with this:
function load_translations() { load_plugin_textdomain('subscribe2', false, untrailingslashit(S2DIR)); load_plugin_textdomain('subscribe2', false, S2DIR . "languages"); load_plugin_textdomain('subscribe2', false, WP_LANG_DIR); } // end load_translations()Let me know if that helps and if it does I’ll roll that into the next release.
@bob / Justin,
Actually, I’ve just had time to take a closer look, I can see that the trailing slash is needed so it isn’t that. π I’ll keep looking.
Hi Matt,
Could it be the forward slashes being used at the end of the path, Windows uses backslash for filesystem delimiters? We have mixed delimiters here.
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(
C:\Inetpub\vhosts\mysite.myhost.com\httpdocs/wp-content/plugins/C:\Inetpub\vhosts\mysite.myhost.com\httpdocs/wp-content/languages/subscribe2-en_US.mo) is not within the allowed path(s): (C:\Inetpub\vhosts\mysite.myhost.com\httpdocs\;C:\Windows\Temp\;C:\Inetpub\vhosts\mysite.myhost.com\httpdocs\wp-content\plugins\;C:\Inetpub\vhosts\mysite.myhost.com\httpdocs\wp-content\languages\;) in C:\Inetpub\vhosts\mysite.myhost.com\httpdocs\wp-includes\l10n.php on line 339Best Regards
JustinI don’t think so, WordPress strips those out and the Codex documents advise that they must be there. If it was that I would have thought there’d be wider issues with Windows hosting.
@bob / Justin,
I’ve tracked down a core bug that is likely causing this issue:
http://core.trac.ww.wp.xz.cn/ticket/20813Hi Matt,
I have the same problem which appeared after moving wp to the new server, looking forward to hearing some possible solutions.
Are you on Windows hosting too? Can you try applying the core WordPress patch to the wp-admin/includes/plugin.php file as described here:
http://core.trac.ww.wp.xz.cn/ticket/20813Yes I am on Windows hosting server too, will try to and inform you here
The topic ‘Subscribe2 Version 8.9.1 error’ is closed to new replies.