WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11152 closed defect (bug) (fixed)

FTPS: Unable to locate WordPress Root directory

Reported by: scribu Owned by: dd32
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.9
Component: Filesystem API Keywords: has-patch tested commit
Focuses: Cc:

Description

Using a nightly from a few days ago, I get the above error when trying to do a core upgrade.

Also, it only lets me use FTPS.

It was working last week.

Attachments (1)

11152.diff (1.9 KB) - added by dd32 4 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 dd324 years ago

  • Component changed from Upgrade/Install to Filesystem
  • Milestone changed from Unassigned to 2.9
  • Owner set to dd32

Do you have the FTP extension available?

When you say it only allows you to use FTPS, On the credentials page, it only has 'FTPS' or is 'FTP' there, but grayed out?

Do you have a FTPS Enabled server? (Do you know?)

Do you have FTP_SSL or FTP_SSH defined in wp-config.php (at all?)

I just noticed that the FTP_* constants are only checked via defined('FTP_*'), no checking of the value.. I'll get a patch for that, Not sure if its your problem however.

comment:2 scribu4 years ago

  • Cc scribu@… added

FTP is there but grayed out.

I assume I do have FTPS, since it worked before.

I don't have FTP_SSL or FTP_SSH defined in wp-config.php

When I try to upgrade a plugin, I just get the notice:

Notice: Use of undefined constant FTP_TIMEOUT - assumed 'FTP_TIMEOUT' in /public_html/wp/wp-admin/includes/class-wp-filesystem-ftpext.php on line 85

comment:3 scribu4 years ago

I added define('FTP_SSH', true); and the FTP option is no longer disabled.

Upgrades now work, with either FTP or FTPS selected.

comment:4 dd324 years ago

  • Status changed from new to accepted

dd324 years ago

comment:5 dd324 years ago

  • Keywords has-patch added
  • Logic inversion..
  • Added some extra checks for constants being defined as false
  • s/FTP_TIMEOUT/FS_TIMEOUT/

comment:6 scribu4 years ago

  • Keywords tested added

Tested the patch on the said server and it seems to be working without me having to set FTP_SSH in wp-config.php

comment:7 dd324 years ago

  • Keywords commit added

comment:8 ryan4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [12268]) Fix wpfs root dir location. Props dd32. fixes #11152

Note: See TracTickets for help on using tickets.