php - ssh2_exec wget won't work -


i want download file using ssh2_exec. things xdotool work wget/pkill don't.

here's code

function __construct($host, $user, $pw, $port) {         $this->sshc = ssh2_connect($host, 22);         ssh2_auth_password($this->sshc, $user, $pw); }  function downloadfile() {         ssh2_exec($this->sshc, "wget http://path/to/file"); } 

try using absolute paths programs (/usr/bin/wget). can find full paths puttying in , running:

which wget 

also take @ output stdout , stderr streams in order further debug problems.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -