Using rsh from exec() Windows 2008 Server

939 Views Asked by At

It seems many people have similar questions to this but none have been answered that fit what I am doing.

I am currently running apache and php on a Windows 2008 R2 server. From there I am trying to run an rsh command. Here is an example:

exec('rsh compname -l username "perl /mypath/server_info.pl"', $output, $status);

$output is always empty, and $status is always 0.

Prior to setting this up on this 2008 server, I had it working on a windows XP box with the same configuration. It connects the the same server with the same username and runs the same pl script. I can even open them both in a browser side by side and it works on the XP machine and not on the 2008 server.

Even if I run a command as simple as ls through rsh I get no output. Also it doesn't appear to be a php problem since if I just run

exec('ping servername',$output, $status);

I get the output expected.

Has anyone seen an issue like this or have any idea why rsh specifically is not sending its output?

0

There are 0 best solutions below