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

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -