nixCraft Linux / UNIX / Shell Scripting Forum

nixCraft

Linux / UNIX Tech Support Forum

PHP exec rsh command

This is a discussion on PHP exec rsh command within the Linux software forums, part of the Linux Getting Started category; Not sure if I should be posting here, but here is my problem. I am executing the rsh command from ...


Register free or login to your account to remove all advertisements.

Go Back   nixCraft Linux / UNIX / Shell Scripting Forum > Linux Getting Started > Linux software

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

Thread Tools Display Modes
  #1 (permalink)  
Old 18th March 2010, 01:48 AM
Junior Member
 
Join Date: Mar 2010
OS: Debian
Scripting language: Bash and friends
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
jtanmay is on a distinguished road
Default PHP exec rsh command

Not sure if I should be posting here, but here is my problem.

I am executing the rsh command from my windows server to remote linux machine, everything runs fine and I do get the results back.

But when I run the same command on the website (php) hosted on same server I get an error code of 1 back.

I have added my host name to /etc/hosts.equiv

command i use in php
exec('rsh remotehostname -l username pwd', $result, $error);
it gives an empty array of result and $error = 1

While the same command runs gud from the command line of windows server to which we have hosted our site.

Thanks
Tanmay
Reply With Quote
The Following User Says Thank You to jtanmay For This Useful Post:
deep khajja (24th March 2010)
  #2 (permalink)  
Old 19th March 2010, 05:41 PM
Junior Member
 
Join Date: Mar 2010
OS: Debian
Scripting language: Bash and friends
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
jtanmay is on a distinguished road
Default

after two days.. atlast i have got the issue fix..
Here is the a simple fix, some one might be help.

Apache on Windows server runs with SYSTEM as the user, so we had to add the SYSTEM user in the host.equiv files.


Happy coding/debugging

Tanmay
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
save command and command output savook CentOS / RHEL / Fedora 1 8th May 2009 05:33 PM


All times are GMT +5.5. The time now is 08:49 PM.


Powered by vBulletin® Version 3.8.6 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40