Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.4.5

Bug #8193 Wrong result on Windows
Submitted: 2006-07-12 10:57 UTC
From: cweiske at cweiske dot de Assigned: cconstantine
Status: Closed Package: Net_Ping (version 2.4.1)
PHP Version: 5.1.2 OS: Windows
Roadmaps: 2.4.3    
Subscription  


 [2006-07-12 10:57 UTC] cweiske at cweiske dot de (Stefan Priebsch)
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) }

Comments

 [2007-04-17 05:09 UTC] cweiske (Christian Weiske)
Could you please do a ping on a console, until it generated 4 pings, and attach the output here? This will help writing unit tests.
 [2007-04-27 14:30 UTC] cconstantine (Craig Constantine)
I have the ping output we need to fix this. (Volunteers have submitted a variety of ping output from lots of platforms.) I'm working on a patch to rewrite the ping output parsing.
 [2007-05-11 03:06 UTC] cconstantine (Craig Constantine)
confirmed. I'm working on a patch to overhaul the output parser. (Someone even sent me sample output for the German locale on windows. :) See related bug #758
 [2007-08-01 08:32 UTC] ikke007 (Mark Van Straten)
On Dutch Windows Vista the outcome of Net_Ping is also incorrect. --- start of PING ---- Pingen naar www.hotmail.aate.nsatc.net [212.162.1.124] met 32 bytes aan gegevens: Antwoord van 212.162.1.124: bytes=32 tijd=15 ms TTL=54 Antwoord van 212.162.1.124: bytes=32 tijd=15 ms TTL=54 Antwoord van 212.162.1.124: bytes=32 tijd=15 ms TTL=54 Antwoord van 212.162.1.124: bytes=32 tijd=14 ms TTL=54 Ping-statistieken voor 212.162.1.124: Pakketten: verzonden = 4, ontvangen = 4, verloren = 0 (0% verlies). De gemiddelde tijd voor het uitvoeren van ‚‚n bewerking in milliseconden: Minimum = 14ms, Maximum = 15ms, Gemiddelde = 14ms --- end of PING ---
 [2007-12-27 23:06 UTC] cconstantine (Craig Constantine)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.