List all packages with exec()
Posted: Thu Jun 08, 2017 5:17 pm
I'm trying get a list of all available packages using PHP exec() but it returns only empty array:
The same for another format type (shell, plain etc)
What's wrong?
Code: Select all
$cmd = '/usr/bin/sudo /usr/local/vesta/bin/v-list-user-packages json';
$return = 0;
$output = array();
exec($cmd, $output, $return);
print_r(json_decode(implode("\n", $output), true));
What's wrong?