|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2021-02-10 16:18 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: cmb
[2021-02-10 16:18 UTC] cmb@php.net
[2021-02-10 16:27 UTC] cmb@php.net
[2021-02-24 21:09 UTC] langemeijer@php.net
[2021-02-24 21:09 UTC] langemeijer@php.net
-Status: Verified
+Status: Closed
[2021-02-24 21:09 UTC] langemeijer@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
Description: ------------ PHP 7.1.11 nts x64 Pecl ssh2 7.1 1.1.2 nts x64 (although it happens with 1.0, 1.1, 1.1.1 as well) When I try to set stream_set_timeout to the resource given by ssh2_exec it fails with: PHP Warning: stream_set_timeout(): No support for ssh2 stream timeout. Please recompile with libssh2 >= 1.2.9 But the phpinfo shows ssh2 SSH2 support => enabled extension version => 1.1.2 libssh2 version => 1.7.0 banner => SSH-2.0-libssh2_1.7.0 So I think 1.7.0 is >= 1.2.9 Why is it complaining about the version then Test script: --------------- $session = ssh2_connect('localhost', 2222); ssh2_auth_password($session, 'ubuntu', 'ubuntu'); $out = ssh2_exec($session, 'date ; sleep 10s; date'); stream_set_timeout($out, 5); stream_set_blocking($out, true); echo stream_get_contents($out); Expected result: ---------------- The stream_get_contents should return after 5 seconds (and therefore I should get only one date in the output) Actual result: -------------- The stream_gets_contents returns after the end of script execution (10 s) and I get the two dates