PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_Ping » Bug #8193

Wrong result on Windows

Details

Submitted2006-07-12 10:57 UTC
Fromcweiske at cweiske dot de
Assignedcconstantine
StatusClosed
PackageNet_Ping
PHP Version5.1.2
OSWindows
Roadmaps2.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)
}