Page 1 of 1

Run script on remote system

Posted: Sat Apr 01, 2006 12:15 pm
by israel
Hi!,
I've got a problem. I ve got a server A and a server B. On server A there is a Apache. I've got a Perl or Bash script used to add an user account (username and other information about new account are the parameters of the script). How to write a php page (running on Apache on server A) that could execute my Bash/Perl script on server B.
thanks for your help,
sorry for my english ;)

Posted: Sat Apr 01, 2006 12:52 pm
by Christopher
The simplest way to execute a Bash/Perl script on a remote server running Apache would probably be CGI. You may need to modify or write a wrapper for your Bash/Perl script so it could be executed as a CGI, but that would be easy. Just search for HOWTOs on writing Perl CGIs -- there should be many.

Posted: Sat Apr 01, 2006 3:01 pm
by israel
Hmm, I think my question is not precisly.
I want to open this php page on another computer - let's call it C - there would be a field to enter a username etc. for new account. Then I'll click OK and new account will be create on server B.

Posted: Sat Apr 01, 2006 5:35 pm
by Christopher
Maybe use something like CURL to connnect to "server B" and create the account.