[wp-trac] [WordPress Trac] #39746: Suddenly getting error on all of my servers: Unable to locate WordPress content directory (wp-content).

WordPress Trac noreply at wordpress.org
Wed Mar 8 05:04:56 UTC 2017


#39746: Suddenly getting error on all of my servers: Unable to locate WordPress
content directory (wp-content).
-----------------------------+------------------------------
 Reporter:  jobst            |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:  4.7.2
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by jobst):

 Replying to [comment:9 dd32]:
 >
 > Thanks for confirming it's a conflict between the SSH2 extension and
 more recent versions of PHP - It looks like an extension update is
 required for compatibility with PHP - I still don't think we should be
 working around this though.

 Why not?
 Please explain.

 If you look at the code of "class-wp-filesystem-ssh2.php" a mix of
 functions are called:
 * PHP inbuilt functions, i.e. function exists() calls PHP's file_exists()
 * SSH2 library functions, i.e. function cwd() calls PHP's
 ssh2_sftp_realpath()

 That is inconsistent.
 If there are any problems with any of the non ssh2 PHP functions that are
 not part of the ssh2 library there will be trouble ...

 So why not using ALL functions from PHP ssh2 to circumvent the problems we
 currently have?
 All I did in my "class-wp-filesystem-ssh2.php" file is using PHP ssh2
 functions, for example I replaced the call to file_exists() with
 ssh2_sftp_stat() and it works, 100%.

 ssh2_sftp_stat() does the same as file_exists() but has no problems, so
 what is wrong using it and why do you hesitate to change it?

 All that I am suggesting stick to the ssh2 library doing the jobs required
 instead of using other functions.

 It works, I and many other people can proof that, happily.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39746#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list