diff --git a/modules/ldapstatus/www/index.php b/modules/ldapstatus/www/index.php index 196d99507a3a8e4a116eb737c27da12ed80f3685..0cc6dd6c4eb721a39f1f10a23c2cbe915b2af01c 100644 --- a/modules/ldapstatus/www/index.php +++ b/modules/ldapstatus/www/index.php @@ -31,12 +31,13 @@ foreach ($orgs AS $orgkey => $orgconfig) { $results[$orgkey]['configMeta'] = checkConfig($orgconfig, array('enable_tls', 'testUser', 'testPassword', 'contactMail', 'contactURL')); $url = parse_url($orgconfig['hostname']); -// print_r($orgconfig['hostname']); -// print_r($url); exit; + $pingreturn = NULL; $pingoutput = NULL; - exec('ping -o -t 1 -c 1 ' . escapeshellcmd($url['host']), $pingoutput, $pingreturn); + exec('ping -W 1 -c 1 ' . escapeshellcmd($url['host']), $pingoutput, $pingreturn); + # echo $pingreturn; exit; + if ($pingreturn == '0') { $results[$orgkey]['ping'] = array(TRUE,join("\r\n", $pingoutput)); } else {