#10216 closed defect (bug) (invalid)
Upgrade to 2.8 breaks all-in-one-seo-pack-plugin on IIS when open_basedir is enabled
Reported by: | ruslany | Owned by: | nbachiyski |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8 |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
the signature of the load_plugin_textdomain has changed from:
function load_textdomain($domain, $mofile)
to
function load_plugin_textdomain($domain, $abs_rel_path = false, $plugin_rel_path = false)
But some plugins, such as all-in-one-seo-pack still use old signature and pass the absolute path to the mo file. This results in the following warning when open_basedir directive is enabled (note the invalid path):
PHP Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(C:\inetpub\wwwroot\wp28/C:\inetpub\wwwroot\wp28/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-en_US.mo) is not within the allowed path(s): (C:\inetpub\wwwroot\) in C:\inetpub\wwwroot\wp28\wp-includes\l10n.php on line 324
The load_plugin_textdomain should be backward compatible.
Change History (5)
#1
@
15 years ago
- Component changed from Plugins to i18n
- Owner changed from ryan to nbachiyski
- Status changed from new to assigned
#3
@
15 years ago
- Summary changed from load_plugin_textdomain in 2.8 breaks all-in-one-seo-pack-plugin on IIS to Upgrade to 2.8 breaks all-in-one-seo-pack-plugin on IIS when open_basedir is enabled
My mistake, the load_plugin_textdomain is not the reason. I have checked that on WP 2.6 the plugin works as expected but after upgrading to 2.8 it stops working. I will update the bug once I figure out why this happens.
I changed the title of the bug to better describe the problem.
#4
@
15 years ago
- Resolution set to invalid
- Status changed from assigned to closed
After more investigation turned out that this is a bug in the plugin. It calls this function and passes an absolute path:
load_plugin_textdomain('all_in_one_seo_pack', WP_PLUGIN_DIR . '/all-in-one-seo-pack');
This causes open_basedir to fail. I was able to repro this on WP 2.6.5 and WP 2.8, which means that this has nothing to do with upgrade to 2.8.
load_plugin_textdomain() looks the same to me in 2.7 and 2.8. Your example above shows load_textdomain(), not load_plugin_textdomain().