WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#10369 closed defect (bug) (wontfix)

ftp upgrade fails when hosting uses different paths for php and ftp access

Reported by: arekm Owned by: dd32
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

wordpress is installed in /home/vhosts/2332/. The same 2332 dir is visible over ftp differently as /mysuperpage.com/.

That's because ftp sees virtual fs while php sees real fs.

search_for_folder() isn't able to deal with this currently.

Possible solutions are:

  • search for all possible installations in user specified ftp server/path area, present possibilities to user and then use what user chooses
  • allow user to speficy direct ftp path in a form like /mysuperpage.com/

Change History (6)

comment:1 dd325 years ago

  • Milestone changed from Unassigned to Future Release
  • Version set to 2.8

In that setup, I dont think its possible to deal with it on a PHP-level, The searching would have to be rather complex.

You'd be better off defining the constants to override it.

Constants are:

$constant_overrides = array( 'FTP_BASE' => ABSPATH, 'FTP_CONTENT_DIR' => WP_CONTENT_DIR, 'FTP_PLUGIN_DIR' => WP_PLUGIN_DIR );

so:

define('FTP_BASE', '/mysuperpage.com/');
define('FTP_CONTENT_DIR', '/mysuperpage.com/wp-content/');
define('FTP_PLUGIN_DIR', '/mysuperpage.com/wp-content/plugins/');

I'm going to leave this open in the future release, Just for reference that the bug exists, and that WordPress should perhaps deal with it itself..

comment:2 gazzat55 years ago

Yep i got this 'bug'. i would vote for a option to specify the path, or maybe add it into the config.

Having created a limited access ftp account to use specifically for upgrade uploads it's annoying that it can't be used because the root path is /~/www/wordpress/

comment:3 dd325 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I do not see how WordPress can manage either of those paths automatically.

Thats what the constants i've mentioned in the first comment are for, Rare cases like yours which are just impossible.

Add those defines to your wp-config.php file and you'll be set, The option to specify those on the connection page is plugin Material IMO.

comment:4 dd325 years ago

(wontfix: Because it cant be fixed in core for -every- host)

comment:5 arekm4 years ago

But fixing this bug is easy. You need to specify ftp server, login and password. wordpress is able to figure out host and login automaticly.

Add another field - path, that's filled automaticly by wordpress but at least user can change it.

And such basic thing as plugin material doesn't sound sane.

comment:6 dd324 years ago

You may define one of the Constants in your wp-config.php file to override the automatic detection, As said above.

Its not currently possible to detect the path before the connection details have been passed, and a present, its not possible to detect this particular error at the time of connecting (which is when the form is displayed)

I'll open another ticket for 3.0 which will ask for the path if it cannot be detected automatically, But it'll have to have a lot of extra catches (which are not present right now) to make it fool proof to prevent people from entering the incorrect details. See #11042

Note: See TracTickets for help on using tickets.