Home » Networking » Net_Ping » Bug #8193
Wrong result on Windows
Details
| Submitted | 2006-07-12 10:57 UTC |
|---|---|
| From | cweiske at cweiske dot de |
| Assigned | cconstantine |
| Status | Closed |
| Package | Net_Ping |
| PHP Version | 5.1.2 |
| OS | Windows |
| Roadmaps | 2.4.3 |
Comments
[2006-07-12 10:57 UTC] cweiske at cweiske dot de
Description:
------------
Net_Ping does not parse the ping result correctly on German Windows if the target host does not answer to the ping.
Test script:
---------------
require_once 'Net/Ping.php'
$ping = Net_Ping::factory();
$ping->setArgs(array('count' => 1));
var_dump($ping->ping($aIp));
Expected result:
----------------
transmitted: 1
recieved: 0
loss: 1
Actual result:
--------------
object(Net_Ping_Result)#2 (11) {
["_icmp_sequence"]=>
array(0) {
}
["_target_ip"]=>
string(8) "usgeführ"
["_bytes_per_request"]=>
int(192)
["_bytes_total"]=>
int(-192)
["_ttl"]=>
NULL
["_raw_data"]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(58) "Ping wird ausgeführt für 192.168.0.123 mit 32 Bytes Daten:"
[2]=>
string(0) ""
[3]=>
string(35) "Zeitüberschreitung der Anforderung."
[4]=>
string(0) ""
[5]=>
string(33) "Ping-Statistik für 192.168.0.123:"
[6]=>
string(69) " Pakete: Gesendet = 1, Empfangen = 0, Verloren = 1 (100% Verl
ust),"
}
["_sysname"]=>
string(7) "windows"
["_round_trip"]=>
array(3) {
["min"]=>
int(0)
["max"]=>
int(0)
["avg"]=>
int(1)
}
["_transmitted"]=>
int(0)
["_received"]=>
int(0)
["_loss"]=>
int(0)
}