Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#37942 closed defect (bug) (duplicate)

ssh2 update failing

Reported by: billthor55 Owned by:
Priority: normal Milestone:
Component: Filesystem API Version: 4.6
Severity: normal Keywords:
Cc: Focuses: administration

Description

ssh2 update reports it is unable to find the wp-content directory. After a fair bit of testing, I have determined that the ssh2-sftp:// file paths are not reliable for many methods.

I've patched my copy of class-wp-filesystem-ssh2.py to use the ssh2-sftp-stat method to for a number of methods including: exists, is_dir, is_file, getchmod...

In testing this appears to be more reliable.

Attachments (1)

class-wp-filesystem-ssh2.php.patch (3.0 KB ) - added by billthor55 10 years ago.
Patch file to use ssh2-sftp-stat for critical methods.

Download all attachments as: .zip

Change History (4)

@billthor55
10 years ago

Patch file to use ssh2-sftp-stat for critical methods.

#1 @dd32
10 years ago

This looks and sounds like the broken PHP7 extension - #35517

In short: A faulty version of the extension was released which broke the file wrappers.

@billthor55 can you confirm you're running PHP7?

#2 @billthor55
10 years ago

Yes I am using PHP7. I was having the same problem several months ago on PHP5. I worked around it then by using the ssh-sftp-updater plugin. This time both plug-ins failed.

The patch I provided returned valid values for the values I tested. The update completed as expected with the patch applied.

#3 @dd32
10 years ago

  • Component GeneralFilesystem API
  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

@billthor55 Thanks for getting back to me.

I'm going to mark this as a duplicate of #35517 then.

Note: See TracTickets for help on using tickets.