Opened 8 years ago
Closed 8 years ago
#37942 closed defect (bug) (duplicate)
ssh2 update failing
Reported by: | billthor55 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6 |
Component: | Filesystem API | Keywords: | |
Focuses: | administration | Cc: |
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)
Change History (4)
#1
@
8 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
@
8 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.
Patch file to use ssh2-sftp-stat for critical methods.