|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-10-13 14:29 UTC] post at rolandgruber dot de
Description: ------------ Hi, I am the developer of LDAP Account Manager. One of our users reported that he gets the following message when multiple ssh2_exec() commands are executed: Warning: ssh2_exec() [function.ssh2-exec]: Unable to request a channel from remote host He tried compiling the last versions of libssh2 and php-ssh2 without success. The error occurs at the second call of ssh2_exec(). Any ideas? Best regards Roland PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 02:00:01 2025 UTC |
I'm confirming this problem. In fact, the problem appears when using stream_set_blocking ($stream, false). so if you do something like : $stream = ssh2_exec ($res, 'ls -l'); stream_set_blocking ($stream, false); while ($line = fgets ($stream)) { echo $line; } the other calls to ssh2_exec will fail with this error. I can't find where the problem could be but it a bug for sure. If you using stream_set_blocking ($stream, true), you can call multiple ssh2_exec (); Maybe the ssh connexion is closed or lost when using stream_set_blocking ($stream, false) ? Thanks for your help !