Opened 17 years ago
Closed 17 years ago
#8195 closed defect (bug) (fixed)
Plugin Installer failed
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.7 | Priority: | high |
| Severity: | major | Version: | 2.7 |
| Component: | Upgrade/Install | Keywords: | |
| Focuses: | Cc: |
Description
defect on 2.7-beta2-9638
2.7 beta1 doesn't have this problem.
in some enviroment, the working_dir on the host will be something like: /home/user/www/site/wp-content/upgrade and plugins_dir: /home/user/www/site/wp-content/plugins
but in the ftp context, the working_dir will be: /www/site/wp-content/upgrade and plugins_dir could be: /www/site/wp-content/plugins.
So, in the wp-admin/includes/plugin-install.php, function wp_install_plugin has the call:
$res = update_pluginfiles_base_dir($working_dir . '/' . $filelist[0], $plugins_dir . $filelist[0]);
if we install the plugin: all-in-one-seo-pack
will be: $res = update_pluginfiles_base_dir("/www/site/wp-content/upgrade/all-in-one-seo-pack", "/www/site/wp-content/plugins/all-in-one-seo-pack");
and in the function: update_pluginfiles_base_dir($from, $to):
it will call: $files = list_files($from), which would opendir("/www/site/wp-content/upgrade/all-in-one-seo-pack"), then if will fail.
when update_pluginfiles_base_dir
defect on 2.7-beta2-9638, but 2.7 beta1 doesn't have this problem.
in some enviroment, the working_dir on the host will be something like: /home/user/www/site/wp-content/upgrade and plugins_dir: /home/user/www/site/wp-content/plugins
but in the ftp context, the working_dir will be: /www/site/wp-content/upgrade and plugins_dir could be: /www/site/wp-content/plugins.
So, in the wp-admin/includes/plugin-install.php, function wp_install_plugin has the call: $res = update_pluginfiles_base_dir($working_dir . '/' . $filelist[0], $plugins_dir . $filelist[0]);
if we install the plugin: all-in-one-seo-pack
will be: $res = update_pluginfiles_base_dir("/www/site/wp-content/upgrade/all-in-one-seo-pack", "/www/site/wp-content/plugins/all-in-one-seo-pack");
and in the function: update_pluginfiles_base_dir($from, $to): it will call: $files = list_files($from), which would opendir("/www/site/wp-content/upgrade/all-in-one-seo-pack"), then if will fail.