note 97610 added to function.ssh2-exec

From: Date: Wed, 28 Apr 2010 05:40:28 +0000
Subject: note 97610 added to function.ssh2-exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-168744@lists.php.net to get a copy of this message
Oddly enough, I've noticed if I attempt to execute anything nothing happens. Now, I don't mean "No content is returned!".. I mean, "The command I told it to execute didn't execute!". Unless the following pattern is followed: $stream = ssh2_exec($connection, "touch ~/some_fake_file", 'xterm'); stream_get_contents($stream); Nowhere in the manual does it imply that stream_get_contents is required for the actual execution to take place, but in this case.. it seems that way. So, if you're having trouble getting commands to execute, try using stream_get_contents(). ---- Server IP: 64.71.164.2 Probable Submitter: 64.202.161.177 ---- Manual Page -- http://www.php.net/manual/en/function.ssh2-exec.php Edit -- https://master.php.net/note/edit/97610 Del: integrated -- https://master.php.net/note/delete/97610/integrated Del: useless -- https://master.php.net/note/delete/97610/useless Del: bad code -- https://master.php.net/note/delete/97610/bad+code Del: spam -- https://master.php.net/note/delete/97610/spam Del: non-english -- https://master.php.net/note/delete/97610/non-english Del: in docs -- https://master.php.net/note/delete/97610/in+docs Del: other reasons-- https://master.php.net/note/delete/97610 Reject -- https://master.php.net/note/reject/97610 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168744) next »