RE: [PHP] remote script execution
| From: | Vail, Warren | Date: | Fri, 03 Sep 2004 22:11:38 +0000 |
| Subject: | RE: [PHP] remote script execution | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-195787@lists.php.net to get a copy of this message | ||
I've done a number of these and the choice depends on many things but
perhaps the biggest factor is;
Is server 1 and server 2 behind the same firewall or are they exposed to the
internet?
Behind a firewall you can probably get away with running any one of the
following commands to remotely execute your script on server 2, from server
1;
Rexec, rsh, rpc, just to name 3. The client part of the protocol is
required on server 1 and the daemon part needs to be running on server 2.
Across the open internet, be very careful here, I would think the choice
would be ssh (secure shell). This has several nice features that could be
useful internally as well. You start out by exchanging encryption keys
between the two servers and because of this handshake, each server trusts
the other in a way that the correct execution permissions can be established
on server 2, and of course the data sent between the servers is encrypted
rendering it virtually useless to third parties. Google for ssh for more
info.
Warren Vail
-----Original Message-----
From: Sean Smith [mailto:ssmith@redred.com]
Sent: Friday, September 03, 2004 1:40 PM
To: php-general@lists.php.net
Subject: [PHP] remote script execution
Scenario:
Server 1 is a LAMP webserver
Server 2 is an email server
I have a php script on server 2 that creates user accounts. It works
great when your logged into the server and running it from the CLI.
I have a GUI on server 1 that is used to input user info into a database.
Question:
What I'd like to do is have server 1 call the script on server 2 and
have server 2 return a variable back to server 1 to be displayed and
ultimately entered into the database. If you understand my rambling
above and have any insight into how to get this accomplished, it would
be greatly appreciated. Thank you.
Sean
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php