RE: [PHP] passthru()/exec()/system() Errors
| From: | Robert Hinojosa | Date: | Wed, 30 Apr 2003 20:19:33 +0000 |
| Subject: | RE: [PHP] passthru()/exec()/system() Errors | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145853@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: julien Beauviala [mailto:php-l@aaton.com]
Sent: Wednesday, April 30, 2003 2:42 AM
To: php-general@lists.php.net
On (30/04/03 01:42), Robert Hinojosa wrote:
>
> I can do passthru("ls -la"), etc. just fine. but I am unable to do a
> passthru("fping -sdC 1 localhost")
>
> Fping is a very useful utility, and I'd very much like to use it in my PHP
> scripts but am currently unable to. Via command line, it works perfectly.
> But through Apache, I get no output.
[snip]
> Fping is in /usr/sbin, but I've also tried moving it to /sbin, /bin, the
> same dir as the PHP script, chown'ing to nobody, etc.
>
> Any suggestions? I've had many problems with permissions in my command
> executions, but never this much.
Try it like so :
<?
$host = "www.php.net";
$fping =
/usr/sbin/fping -sdC 1 $host;
echo $fping;
?>
HTH
j.
----------
Nope, didn't work either... at least not through Apache.
It worked through command line, as well though. I've tried this on two
servers... a plain RH 8.0 and a CPanel, which use Apache 2.0.45 (PHP 4.3.1)
and Apache 1.3.27 (PHP 4.3.2), respectively.
What gives... :( If anyone can help, it'd be much appreciated.
Thanks,
Robert...