|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-12-27 12:31 UTC] samuel dot roze at gmail dot com
[2011-06-23 10:58 UTC] adam at bantha dot co dot uk
[2011-06-23 12:24 UTC] samuel dot roze at gmail dot com
[2011-06-23 12:25 UTC] pierre dot php at gmail dot com
[2011-06-23 12:27 UTC] pierre dot php at gmail dot com
[2012-06-14 22:27 UTC] langemeijer@php.net
[2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
[2014-05-01 23:14 UTC] simon dot jackson at carringbush dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 14:00:01 2025 UTC |
Description: ------------ In the description of ssh2_shell, there's: "Open a shell at the remote end and allocate a stream for it." So the result of this command must be a stream. Well, it's good, I'll use fgets, fwrite and stream_* functions ! BUT, the problem is that I can't use a SSH2 Stream with the stream_select function... Reproduce code: --------------- <?php $session= ssh2_connect('localhost', 22); ssh2_auth_password($session, 'samuel', 'password'); $shell = ssh2_shell($session); $changed = stream_select($a = array($shell), $null, $null, 2); // Wait 2 seconds var_dump($changed); ?> Expected result: ---------------- int(1) Actual result: -------------- Warning: stream_select() [function.stream-select]: cannot represent a stream of type SSH2 Channel as a select()able descriptor in XX on line XX int(0)