Net_ping problems
| From: | Simon H | Date: | Mon, 14 Oct 2002 17:35:20 +0000 |
| Subject: | Net_ping problems | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2493@lists.php.net to get a copy of this message | ||
Hi all
Its been a while since I've posted here, but I have a strange problem and I'm
not quite sure where its coming from:
I'm running FreeBSD 4.7-STABLE/PHP 4.2.3 port (CLI, not mod_php, its installed
also)
I'm using Net_Ping to monitor our customers ADSL connections, running a script
in a crontab every 15 mins. The strange thing is the script runs fine from the
commandline, but when run from crontab I get an email from crontab telling me:
-c: Not Found
-c: Not Found
-c: Not Found
-c: Not Found
-c: Not Found
-c: Not Found
(I'm monitoring 6 IP's)
The only place I can find a "-c" is for the "count" switch in Net/Ping.php.
I'm
not sure if thats what this error means, but if it is, why only from a crontab
and not from the commandline? Is it an error from the script, Ping class, cron,
php?
If anyone can shed light on this I would be most grateful.
Net_Ping IDEA:
How about wrapping the responses from the ping, rather than just providing an
array. So that we can catch "Packets Sent", "Packets Received", etc each in
their own variable, without having all the rest of the text to strip. I have
done this crudely myself, but it is not portable, and I'm not that great at PHP
just yet, sits likely a bit ropey!
Best Regards
Simon H