PHP 8.5.0 Alpha 1 available for testing

Voting

: min(zero, zero)?
(Example: nine)

The Note You're Voting On

gwinans at gmail dot com
15 years ago
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:

<?php
$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().

<< Back to user notes page

To Top