Re: PHP - 2 machines

From: Date: Mon, 14 Apr 2003 01:06:18 +0000
Subject: Re: PHP - 2 machines
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143699@lists.php.net to get a copy of this message
Awesome .. thanks. Now PHP can really rule the roost .. Cheers Rudi. domains@modwest.com wrote:
To execute a php script on another machine on your LAN that is not a webserver, compile php on that server as a CGI binary, or compile it with CLI (command line interface). Then setup some ssh keys between your 2 servers on the lan, and you can make one server issue this command to the other: ssh othermachine /path/to/script.php Where script.php is on the other machine and begins #!/usr/bin/php -q <? ?> The 1st machine will have to have an ssh client and the othermachine will have to accept ssh connections. -- http://modwest.com PHP/MySQL web hosting On Sat, 12 Apr 2003, Rudi Starcevic wrote:
Hi, Q: Is it possible for me to use PHP to execute a function with arguments on another machine on my LAN *without* a web server ( using Linux ) ? Perhaps I would need to use sockets and the CLI to achieve this. Currently I'm using Perl SOAP daemons. Why would I want to do this ? Well I have several machine's with sole tasks. For example 1 mail server, 1 DNS server, 1 FTP server, 1 SAMBA server, 1 database server and 1 web/PHP server. I'd like to have the PHP scripting language on each box so that the machine's can 'talk' to each other and pass configuration details like useradd/userdel etc. In order to make config changes the executing script needs permission's greater than Nobody ( web server user is Nobody ). If I could do that using PHP that would be impressive. Thanks Regards Rudi.


« previous php.general (#143699) next »