Opened 10 years ago
Closed 10 years ago
#33478 closed feature request (fixed)
Still getting the 'Unable to locate WordPress Plugin directory' error
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.4 | Priority: | normal |
| Severity: | normal | Version: | 4.3 |
| Component: | Filesystem API | Keywords: | needs-testing has-patch |
| Focuses: | Cc: |
Description
This is a follow-up to #32345.
I just upgraded to Wordpress 4.3 As the chrooted ssh bug was marked as resolved I disabled SSH SFTP Updater Support plugin and tried. I am still getting the same error message in wordpress when trying to remove a plugin.
Unable to locate WordPress Plugin directory
In the apache error log I found the following error. But its not generated everytime.
ssh2_sftp_realpath() expects parameter 1 to be resource, boolean given in /var/www/test/wp-admin/includes/class-wp-filesystem-ssh2.php on line 196, referer: https://test.fblz.de/wp-admin/plugins.php?action=delete-selected&checked%5B0%5D=ssh-sftp-updater-support%2Fsftp.php&plugin_status=all&paged=1&s&_wpnonce=152648e489
In #32345 there is a conversation mentioned, which lead to the closing. I can't find such a conversation.
Attachments (1)
Change History (8)
#1
@
10 years ago
- Keywords needs-testing has-patch added
- Milestone changed from Awaiting Review to 4.4
#2
@
10 years ago
Hey @dd32, the session seems to be opened correctly. auth.log ist stating the following:
Accepted publickey for update from ::1 port 49131 ssh2: pam_unix(sshd:session): session opened for user update by (uid=0) Received disconnect from ::1: 11: PECL/ssh2 (http://pecl.php.net/packages/ssh2) pam_unix(sshd:session): session closed for user update
I currently use the php-ssh2 provided by the debian repos. Is this version theoretically working?
#3
@
10 years ago
- Type changed from defect (bug) to feature request
Well, disabling the chroot and changing the sftp subsystem to internal-sftp brings it to work. This isn't a long term option, but it's working for now as SSH SFTP Updater Support breaks the customizer.
@dd32 Even though the support plugin currently breaks the customizer, phpseclib seems to be much more reliable then ssh2-php. Maybe phpseclib could be used by wordpress as a second option to provide ssh2?
#4
@
10 years ago
Hey @dd32, the session seems to be opened correctly. auth.log ist stating the following:
The SSH Connection succeeds yes, but the PHP SSH Extension can't properly open a sFTP Session OVER that SSH connection. That is most likely a bug in the ssh2 extension.
I don't have a list of ssh2 extension packages that work, every distribution compiles them individually, and they're custom compiled by pecl when I install them normally.
@dd32 Even though the support plugin currently breaks the customizer, phpseclib seems to be much more reliable then ssh2-php. Maybe phpseclib could be used by wordpress as a second option to provide ssh2?
FYI @terrafrost sounds like https://wordpress.org/plugins/ssh-sftp-updater-support/ needs to be updated.
And yes, phpseclib is far improved over the PHP ssh extension, IMHO I'd like to drop SSH2 support in core completely in favour of the plugin.
Hi @fblz,
It sounds like, to me, that the PHP SSH2 extension simply doesn't work on your PHP configuration, for whatever reason.
It doesn't appear to be anything that WordPress itself can fix - The PHP Extension simply is failing to create a SFTP session over the connected SSH2 connection; even though as the SFTP Update Support plugin proves, the server is willing to allow it.
We should have some error handling for this case, so that it doesn't appear like a WordPress failure, 33478.diff attempts to add that.