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

Bug #11395 Fails to pass arguments when $_system=openbsd
Submitted: 2007-06-21 13:31 UTC Modified: 2007-06-21 16:10 UTC
From: marti Assigned: cconstantine
Status: Closed Package: Net_Ping (version 2.4.1)
PHP Version: irrelevant OS: openbsd
Roadmaps: 2.4.2    
Subscription  


 [2007-06-21 13:31 UTC] marti (Marti Martinez)
Description: ------------ There's no case for "openbsd" in _createArgList, causing openbsd pings to run indefinitely (needs $count to complete) The "linux" case should work just fine for OpenBSD, and is complete enough to get all args. Test script: --------------- //on an OpenBSD (3.9 in my case) system: <?php $ping = Net_Ping::factory(); if(PEAR::isError($ping)) { echo $ping->getMessage(); } else { $ping->setArgs(array('count' => 2)); var_dump($ping->ping('example.com')); } ?>

Comments

 [2007-06-21 14:52 UTC] cconstantine (Craig Constantine)
We are unable to reproduce the bug as reported. Please provide a simple script (10 lines or less) or a link to an external script that can be used to reproduce the bug. If you can provide the script, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR. "openbsd" is represented in the code (present in current package release, not just in the CVS repository.) cf line 464 Net_Ping/Ping.php Are you certain your installation returns "openbsd" (literally, no variation whatsoever) when you run: require_once "PEAR.php"; require_once "OS/Guess.php"; $OS_Guess = new OS_Guess; print( $OS_Guess->getSysname() );
 [2007-06-21 15:15 UTC] marti (Marti Martinez)
> "openbsd" is represented in the code (present in current > package release, not just in the CVS repository.) cf line > 464 Net_Ping/Ping.php That is true for the function "_initArgRelation", the problem is in "_createArgList" starting on line 262. Since there is no "openbsd" case, no arguments are prepared ($retval['pre'] and $retval['post'] in "_createArgList", used as $argList['pre'] and $argList['post'] on line 374) the actual ping command gets run without any arguments, causing it to ping continuously. > Are you certain your installation returns "openbsd" > (literally, no variation whatsoever) when you run: Yes, it does. Thanks for your time and for looking into this!
 [2007-06-21 15:56 UTC] cconstantine (Craig Constantine)
confirmed
 [2007-06-21 16:10 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.