php / pecl-networking-ssh2

Bindings for the libssh2 library
http://pecl.php.net/package/ssh2
Other
51 stars 61 forks source link

Addressing bug and "todos" in ssh2_poll causing sleep behavior #39

Closed rposky closed 3 years ago

rposky commented 4 years ago

Description

During the port to PHP7, the ssh2_poll() implementation was left incomplete/incompatible with PHP7 source changes, possibly related to the long-standing deprecation of LIBSSH2's libssh2_poll, on which ssh2_poll() relies.

The following warning is consistently observed when calling ssh2_poll(), and the underlying interrupt-driven behavior indicating read readiness of the polled resource is lacking such that all invocations effectively sleep for the full given timeout.

PHP Warning:  ssh2_poll(): Invalid data in subarray, no resource element, or not of type resource in libssh2-poll-error.php on line 19

References

  1. Changes to ZVAL allocation and copying
  2. Introduction of REFERENCE type
andypost commented 4 years ago

Function signature also needs fix, faced in php8 compatibility https://github.com/php/pecl-networking-ssh2/pull/42/commits/0b3cec91ea3c53caa2a90339258956302fbdd364

Ref https://github.com/php/pecl-networking-ssh2/pull/42 to fix arg-info