#24826 [Opn->Fbk]: PEAR::Net Ping Bug
| From: | mj@php.net | Date: | Sun, 07 Mar 2004 16:20:23 +0000 |
| Subject: | #24826 [Opn->Fbk]: PEAR::Net Ping Bug | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26180@lists.php.net to get a copy of this message | ||
ID: 24826
Updated by: mj@php.net
Reported By: young at sl dot com dot ua
-Status: Open
+Status: Feedback
Bug Type: PEAR related
Operating System: Linux
PHP Version: 4.3.2
Assigned To: jan
New Comment:
There have been a number of new releases for Net_Ping recently. Can you
please the latest and report back, if the problem persists?
Previous Comments:
------------------------------------------------------------------------
[2003-08-20 06:18:46] neufeind@php.net
Hmm, the code mentioned above seems quite strange - since it has the
same code in both parts of the if-tree :-))
Don't the patches from Progman2002 work fine? Didn't have time to try
but had a look at the source. And his ideas seem to make the parser
more flexible. They should also catch the recent problems correctly.
Might somebody of the Net_Ping-team please have a look? Do they maybe
have sample-outputs from various linux-systems at hand - or is the
output the same on all variants / versions?
------------------------------------------------------------------------
[2003-08-20 05:58:21] young at sl dot com dot ua
For repair this bug need to change:
From:
---------
if (strpos($this->_raw_data[$raw_data_len - 1], 'mdev')) {
/* do not forget the rtt field */
$this->_round_trip['min'] = ltrim($round_trip[5]);
$this->_round_trip['avg'] = $round_trip[6];
$this->_round_trip['max'] = $round_trip[7];
} else {
$this->_round_trip['min'] = ltrim($round_trip[4]);
$this->_round_trip['avg'] = $round_trip[5];
$this->_round_trip['max'] = $round_trip[6];
}
------------------
To:
if (strpos($this->_raw_data[$raw_data_len - 1], 'mdev')) {
/* do not forget the rtt field */
$this->_round_trip['min'] = ltrim($round_trip[4]);
$this->_round_trip['avg'] = $round_trip[5];
$this->_round_trip['max'] = $round_trip[6];
} else {
$this->_round_trip['min'] = ltrim($round_trip[4]);
$this->_round_trip['avg'] = $round_trip[5];
$this->_round_trip['max'] = $round_trip[6];
}
------------------
------------------------------------------------------------------------
[2003-08-20 05:47:26] young at sl dot com dot ua
why there is no parametr -i in Linux options ?!!
-i interval
Wait interval seconds between sending each packet. The
default is to wait for one second between
each packet normally, or not to wait in flood mode.
------------------------------------------------------------------------
[2003-08-20 03:32:29] young at sl dot com dot ua
-----------
[14] => rtt min/avg/max/mdev = 250.889/298.179/397.075/41.305 ms
)
[_sysname] => linux
[_round_trip] => Array
(
[min] => 298.179
[avg] => 397.075
[max] => 41.305
)
-----------------
I get it again from CVS.
There are another error.
min/avg/max/mdev = rtt min/avg/max/mdev =
250.889/298.179/397.075/41.305 ms
Now:
[min] => 298.179
[avg] => 397.075
[max] => 41.305
Need:
[min] => 250.889
[avg] => 298.179
[max] => 397.075
------------------------------------------------------------------------
[2003-08-18 08:48:33] jan@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/24826
--
Edit this bug report at http://bugs.php.net/?id=24826&edit=1