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

Bug #2559 Error handling ping output
Submitted: 2004-10-18 09:23 UTC Modified: 2007-12-27 18:04 UTC
From: johann dot hoehn at ecommerce dot com Assigned: cconstantine
Status: Closed Package: Net_Ping
PHP Version: 4.3.9 OS: Linux (Fedora Core 2)
Roadmaps: 2.4.3    

 [2004-10-18 09:23 UTC] johann dot hoehn at ecommerce dot com
Description: ------------ It seems for some reason when Net_Ping executes the ping command it is not capturing stderr at all. This results in some notice messages about $parts being undefined in the function _parseResultlinux(). In _parseResultLinux is automatically subtracts 4 from the line length which can result in the for loop not being triggered and the $parts will be undefined. This can happen when several of the ping packets are blocked causing the output to being signafically less than the function expects. For example, trying to ping results in 5 lines of output and the function will fail the for loop causing $parts to be undefined. Reproduce code: --------------- function _parseResultlinux() { ... print_r($this->_raw_data); ... } Actual result: -------------- Array ( [0] => PING ( 32(60) bytes of data. [1] => [2] => --- ping statistics --- [3] => 4 packets transmitted, 0 received, 100% packet loss, time 3009ms [4] => )


 [2007-05-10 22:05 UTC] cconstantine (Craig Constantine)
I'm working on a patch to overhaul the output parser. See related bug #758
 [2007-12-27 18:04 UTC] cconstantine (Craig Constantine)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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.