Hi guys,
With the help of a guy, we found the solution. So for information, this is
what you have to do to succeed such kind of command.
You have to use the same username in your webserver as the name of the
account in the remote machine you're trying to access with rsh.
typically if you want to do this:
$res = exec("rsh x.x.x.x -l TOTO ping x.x.x.x");
echo " $res ";
The webserver user should be TOTO (you can change it in your httpd.conf file
on Linux box)
hope it will help!
fred
-Message d'origine-
De : Chris W. Parker [mailto:[EMAIL PROTECTED]
Envoyé : jeudi, 18. mars 2004 17:59
À : [EMAIL PROTECTED]; [EMAIL PROTECTED]
Objet : RE: [PHP] Problem to display the results of an exec + rsh
command
Frédéric Martin <mailto:[EMAIL PROTECTED]>
on Thursday, March 18, 2004 7:31 AM said:
> $res = exec("rsh x.x.x.x -l username ping x.x.x.x);
> echo " $res ";
>
> I cannot display the result of the ping made in the remote host.
> any idea to fix that?
> thank you in advance for your tips ...
i don't have any idea why it's not working and i've never used exec(), but
maybe you'd have better luck with the back tick operator (at least i think
it's an operator)?
$res = `rsh x.x.x.x -l username ping x.x.x.x`;
chris.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php