OpenHook – open_basedir restriction in effect error crashing blog
-
using thesis 1.8
wordpress 4.3.1
thesis-openhook 4.2.0Recently I noticed one of my blogs crashed, showing a 500 error. after digging through the logs I noticed this:
PHP Warning: is_readable(): open_basedir restriction in effect. File(D:\IISData\DOMAIN.org\httpdocs\blog/wp-content/plugins/D:\IISData\DOMAIN.org\httpdocs\blog\wp-content\plugins\thesis-openhook/languages/openhook-en_US.mo) is not within the allowed path(s) (D:\IISData/DOMAIN.org\;C:\Windows\Temp\) in D:\IISData\DOMAIN.org\httpdocs\blog\wp-includes\l10n.php on line 481
The error makes it look like it is concatenating two absolute urls, so I started digging and in wp-includes/l10n.php I found in
load_plugin_textdomain()
:if ( false !== $plugin_rel_path ) { $path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' ); }
and since we are already adding
plugin_dir_path( __FILE__ )
from the plugin we’ll naturally have a problem (thesis-openhook/index.php):public function i18n() { load_plugin_textdomain( 'openhook', false, plugin_dir_path( __FILE__ ) . 'languages' ); }
so since
load_plugin_textdomain()
adds the URL to the plugins dir, we do not need to include it as a parameter. just I changed this function to read:public function i18n() { load_plugin_textdomain( 'openhook', false, 'thesis-openhook/languages' ); }
and everything started working again. I’m not not actually using multilingual so I can’t test fully but figure it might help someone if they are having issues. Hopefully this could get fixed in a future release.
- The topic ‘OpenHook – open_basedir restriction in effect error crashing blog’ is closed to new replies.