ping scan is using getPHPExecutableFromPath() to know where is PHP. If this function returned FALSE, the line is executed without it, so result is always "No alive host found!".
I advise to edit site/ipaddr/scan/subnetScanDiscoveryPing.php
and add check on phpPath return code.
Code would be :
# check if any hits are present
if($ip) {
# create 1 line for $argv
$ip = implode(";", $ip);
# get php exec path
$phpPath = getPHPExecutableFromPath();
if ($phpPath === false) $error = 'Cannot find PHP executable path.';
else {
# set script
$script = dirname(__FILE__) . '/../../../functions/scan/'.$_REQUEST['pingType'].'Script.php';
# invoke CLI with threading support
$cmd = "$phpPath $script '$ip'";
# save result to $output
exec($cmd, $output, $retval);
# format result - alive
$alive = json_decode(trim($output[0]));
# if not numeric means error, print it!
if(!is_numeric($alive[0])) {
$error = $alive[0];
}
#verify that pign path is correct
if(!file_exists($pathPing)) { $pingError = true; }
}
}
Anonymous
Hi, have added pathCheck with modified ping code for next relase.
brm