Subject: | Report a bug in Net-Ping-External |
Date: | Fri, 21 Aug 2009 08:17:05 -0400 |
To: | bug-Net-Ping-External [...] rt.cpan.org |
From: | Jonathan Windsor <jwindsor [...] intelesyscorp.com> |
The following example code works fine from the command line, but always
returns a false when executed from a browser (IE) on the Web Server.
########################################
use Net::Ping::External qw(ping);
my $alive = ping(host => "127.0.0.1");
print "\n\nalive = $alive<br>\n\n";
if ($alive) {
print "\n\n<br>127.0.0.1 is online\n\n";
}else{
print "\n\n<br>127.0.0.1 is offline\n\n";
}
######################################
Command Line Results:
-----------------------------------
alive = 1
127.0.0.1 is online
Browser (IE) Results:
-------------------------------
alive = 0
127.0.0.1 is offline
1. Binary build 822 ActiveState Perl
2. Perl v5.8.8 built for MSWin32-x86-multi-thread
3. Operating Sytems Windows 2003 Server, IIS 6.0.