system('rsh ...') not working
Posted: Fri Mar 11, 2005 12:13 pm
I'm running php4 with apache on windows and I'm trying to use system() with rsh commands to a linux box but i can't seem to get it to work. I've seen a few posts about attempting similar things and getting the same results that I am getting, but I have not come across any resolutions yet.
Here is the code I'm executing:
I get no output and my return code is 1. When I run this rsh command at a dos prompt it works fine. Also if i replace the command in the php code to something like 'dir' then that works and i get a directory listing. I just can't seem to get the rsh command to work. Any ideas?
feyd | Please use
Here is the code I'm executing:
Code: Select all
<?php
echo '<pre>';
system('rsh host -l user command',$retval);
echo '</pre>
<hr>RC='.$retval;
?>feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]