I've seen more than a few questions on this whilst searching, but none with a working answer, just recommendations of other things to try
$server = "IPADDRESS";
$username = "USER";
$port = "22";
$ftpuser = "FTPUSER"
$ftppass = "FTPPASS"
$command = "/usr/local/psa/bin/subscription --create " . $domain . " -owner admin -service-plan 'Default Domain' -ip " . $server . " -login " . $ftpuser . " -passwd '" . $ftppass . "'";
$cmd_string = "ssh -p ".$port." ".$username."@".$server." ".$command;
exec($cmd_string, $output);
echo $command;
echo $output;
Using uptime as a command works fine, and taking the exact output of the $command and manually pasting it also works fine with a usual output of SUCCESS: Creation of domain DOMAIN completed
- However when running this, it simply outputs 'Array', with no contents. Am I missing something?