Bug #15941 [Opn]: exec() never returns when pinging firewalled host
| From: | craig at constantine dot name | Date: | Wed, 25 Feb 2009 14:44:56 +0000 |
| Subject: | Bug #15941 [Opn]: exec() never returns when pinging firewalled host | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-72@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=15941&edit=1
ID: 15941
Updated by: craig@constantine.name
Reported By: babineau at gmail dot com
Summary: exec() never returns when pinging firewalled host
Status: Open
Type: Bug
Package: Net_Ping
Operating System: Linux (Gentoo)
PHP Version: 5.2.8
Roadmap Versions:
New Comment:
Request for additional info:
...can you redo your 'ps' info with the 'j' flag. I'm curious about the
Ping
process' "STAT" flags.
...does the checkHost() method work [not hang]? The checkHost() method
attempts to set ping's "deadline" argument based on its idea of how
your
system's ping works.
Previous Comments:
------------------------------------------------------------------------
[2009-02-25 13:54:02] babineau
Description:
------------
Using Net_Ping 2.4.4 (stable).
When pinging a remote host with ICMP filtered at the firewall,
exec() seems to never return. Running ping from the command line comes
back after a bit, but when run through the script it never stops.
Here's a ps after waiting >5 minutes for the script to return:
$ ps -ef|grep ping
apache 26061 23830 0 09:01 ? 00:00:00 sh -c cd
'/prj/htdocs/net' ; /bin/ping -c 4 -t 60 microsoft.com
apache 26062 26061 0 09:01 ? 00:00:00 /bin/ping -c 4 -t 60
microsoft.com
Now same command from the commandline:
$ /bin/ping -c 4 -t 60 microsoft.com
PING microsoft.com (207.46.232.182) 56(84) bytes of data.
ps -ef |grep
--- microsoft.com ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2999ms
$
Test script:
---------------
$ping = Net_Ping::factory();
if(!PEAR::isError($ping))
{
$ping->setArgs(array(
'count' => 4,
'ttl' => 60,
));
$response = $ping->ping('microsoft.com');
}
else
{
$errors[] = $ping->getMessage();
}
Expected result:
----------------
$response include the parsed ping result.
Actual result:
--------------
Nothing is the actual result. It just hangs.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=15941&edit=1