Re: Bug #24491

From: Date: Sun, 06 Jul 2003 15:52:40 +0000
Subject: Re: Bug #24491
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18048@lists.php.net to get a copy of this message
On Saturday, July 5, 2003 19:07, Olivier Hill wrote: > Martin Jansen wrote: >> As Jan has been updating the code of Net_Ping in the past, I guess he is >> the guy for that. Apart from that I don't have a FreeBSD box here to >> test this ;-). > Neither have I... but: > http://www.freebsd.org/cgi/man.cgi?query=ping > Can always be useful ;) By the way, I could fix the script, but I'm > really wondering what's the "best and cleaner" way to detect the OS via > PHP. Is there any #ifdef style conditions, like preprocessing commands > in C? I can't use "uname -s", it's not portable on Win32. Net_Ping already uses the OS_Guess class, the best way for detecting the OS ;). AFAIS Net_Ping uses the right params for freebsd: /** * Creates the argument list according to platform differences * * @return string Argument line * @access private */ function _initArgRelation() "freebsd" => array ( "timeout" => "-t", "ttl" => "-m", "count" => "-c", "quiet" => "-q", "size" => NULL, "iface" => NULL ), perhaps the problem is an old release or an invalid arguments handling. -- Tomas V.V.Cox mailto:cox@idecnet.com

« previous php.pear.dev (#18048) next »