OK, I played more with rsh and it 'almost' pointed to IIS or PHP:
This is my original test php script:
test.php
<?php
$rl = system ("rsh rmoteunix -l username \"ls\"", $rc);
echo $rc;
echo $rl;
?>
The result of running this test.php was $rc=1 and balnk in $rl, and
'ls' wasn't executed on the remoteunix.
So I put the rsh line into a test.bat:
c:\myweb\home\test.bat:
rsh remoteunix -l username "ls"
and changed the test.php to:
<?php
$rl = system ("c:\\myweb\\home\\test.bat");
echo $rc;
echo $rl;
?>
Now in the browser it showed
C:\MyWeb\Home>rsh remotehost -l username "ls" remotehost: remuser too
long rsh: can't establish connection
and $rc is blank and $rl "C:\MyWeb\Home>rsh remoteunix -l username
"ls"
However, if I ran test.php from cmd window (c:\php>php
c:\myweb\home\test.php), I could get 'ls' executed from both cases.
Where does this lead to? I'd assume IIS or PHP changed something such
as logon name. Does anyone have experienced this problem?
Thanks,
Tom
tm*******@yahoo.com (TL) wrote in message news:<74**************************@posting.google. com>...
Please help. I need to get this problem resolved ...
When I ran remote shell to a Sun Solaris 8 box from W2K box, the DOS'
CMD window popped up and stayed there until CGI timeout. The funny
thing was that it did run the Unix script and turned out the right
result. Just the CMD window ... I had to kill the window by clicking
on 'x'. After that it displayed CGI timeout error. What was going
on?
Thanks,
Tom
Environment - IIS 5, PHP 4.3.9, Windows 2000, Solaris 8.
PHP script on Windows 2K:
<? php
/* Call a script on a remote unix box to display the name */
system <"rsh remoteunix -l thisuser \"/mybin/test.sh $firstName
$lastName\"">;
?>
Shell script on Unix box:
#!/bin/sh
firstName=$1
lastName=$2
echo Your name is: $firstName $lastName
exit 0