Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 2490  / 3 Years ago, fri, october 22, 2021, 9:47:49

I had my Ubuntu 15.10 system working just fine, and Wordpress updates happened over ssh. But when I upgraded Ubuntu to 16.04, the switch to php7.0 broke Wordpress updates. At first it was prompting for FTP login credentials until I installed php-ssh2 (which cautions that it's based on a git snapshot). Now when I try to upgrade a plugin, it says



An error occurred while updating WP to Twitter: Unable to locate WordPress Content directory (wp-content).


And in /var/log/apache2/error.log:



[Sun Jun 12 11:01:10.969931 2016] [:error] [pid 5545] [client 192.168.1.11:65278] PHP Warning:  file_put_contents(): Unable to open ssh2.sftp://Resource id #81/.maintenance on remote host in /home/blog/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php on line 252, referer: http://xxxx.com/wp-admin/update-core.php?action=do-plugin-upgrade
[Sun Jun 12 11:01:10.970772 2016] [:error] [pid 5545] [client 192.168.1.11:65278] PHP Warning: file_put_contents(ssh2.sftp://Resource id #81/.maintenance): failed to open stream: operation failed in /home/blog/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php on line 252, referer: http://xxxx.com/wp-admin/update-core.php?action=do-plugin-upgrade


Am I missing a package, or a configuration item, or what?


More From » ssh

 Answers
3

I had the same problem. This seems to be a bug in php-ssh2 (from the Ubuntu repo).



After removing php-ssh2, and installing a newer version with pecl (pecl install ssh2-1.0), the problem was solved.



I submitted a bug report:
https://bugs.launchpad.net/ubuntu/+source/php-ssh2/+bug/1617294


[#14851] Saturday, October 23, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tonhorn

Total Points: 196
Total Questions: 118
Total Answers: 95

Location: Vanuatu
Member since Fri, May 13, 2022
2 Years ago
;