[wp-trac] [WordPress Trac] #42345: file_put_contents: failed to open stream

WordPress Trac noreply at wordpress.org
Thu Oct 26 09:56:14 UTC 2017


#42345: file_put_contents: failed to open stream
--------------------------+-----------------------------
 Reporter:  eduardbosch   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:  4.8.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi,

 I've started having problems accessing some pages in my Admin dashboard.

 First, I was unable to enter settings page and also some other plugin
 pages. When I tried to enter those pages, I saw in chrome
 'ERROR_EMPTY_RESPONSE' and in my apache error.log I was seeing this errors
 {{{
 AH00051: child pid 11660 exit signal Segmentation fault (11), possible
 coredump in /var/cache/apache2/
 }}}

 After enabling coredump, I've noticed that this was causing the problem:
 {{{
 ...
 #0  __strstr_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strstr-
 sse2-unaligned.S:22
 22      ../sysdeps/x86_64/multiarch/strstr-sse2-unaligned.S: No such file
 or directory.
 (gdb) bt full
 #0  __strstr_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strstr-
 sse2-unaligned.S:22
 No locals.
 #1  0x00007fe0b756e2d8 in php_ssh2_fopen_wraper_parse_path () from
 /usr/lib/php5/20121212/ssh2.so
 No symbol table info available.
 #2  0x00007fe0b757225c in ?? () from /usr/lib/php5/20121212/ssh2.so
 No symbol table info available.
 #3  0x00007fe0c1e4ae07 in _php_stream_stat_path () from
 /usr/lib/apache2/modules/libphp5.so
 No symbol table info available.
 #4  0x00007fe0c1dc6a95 in ?? () from /usr/lib/apache2/modules/libphp5.so
 No symbol table info available.
 #5  0x00007fe0c1dc8d8b in zif_file_exists () from
 /usr/lib/apache2/modules/libphp5.so
 No symbol table info available.
 #6  0x00007fe0c1cff8c6 in phar_file_exists () from
 /usr/lib/apache2/modules/libphp5.so
 No symbol table info available.
 ...
 }}}

 After some research, I finally installed ssh2 with pecl. Since then I can
 access all admin pages without problem, but now I cannot update any
 plugins or manage some plugins (like backup one backup plugin). I receive
 this message 'Update Failed: Unable to locate WordPress content directory
 (wp-content).'

 Also in apache error.log file I receive this errors when I try to update a
 plugin
 {{{
 PHP Warning:  file_put_contents(ssh2.sftp://Resource id
 #1144/.maintenance): failed to open stream: operation failed in
 /var/www/html/wp-admin/includes/class-wp-filesystem-ssh2.php on line 253,
 referer: http://mywebpage.com/wp-admin/plugins.php
 }}}

 My config:
 PHP 5.5.9-1ubuntu4.22
 ssh2 extension 0.13
 libssh2 version 1.4.3
 ssh2 SSH-2.0-libssh2_1.4.3

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42345>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list