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 😉

    Hvae server A call a script on server B that invokes the local script

      bastien wrote:

      Hvae server A call a script on server B that invokes the local script

      I'm sorry but I'm not sure what does it mean 🙁

      Maybe more 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.

        Just point the form to a script on server B. eg

        <form action="http://serverB/process.php" method="post">
          <input type="text" name="uname">
          <input type="text" name="upass">
        </form>
        

          What does Server B have on it? I'm assuming from your first post that it doesn't have a web server running on it? Does it have ssh?
          If it does you can run programs securely over the network with the following syntax

          ssh user@serverB '/path/to/script_to_run'
          

          To avoid being prompted for a password you'd have to set up your ssh keys correctly for the user which apache is being run as on server A

            It cant be a ssh - on server B could be a Linux, Unix or Windows...
            Ive heard that php5 can execute a script on remote server but I dont know how

              Thorpe's example is a correct way of doing this. You can also use CURL to simulate a browser call to your remote script

                Thorpe's example only works if Server B has a webserver running on it. That has not been stated. The first post stated that Server A has a web server running but says nothing of what's running on server B.

                i_s_r_a_e_l, we need to know what services will be available on all the machines involved in this scenario. Does Server B have a web server running? If not, what does it have and what can it have?

                  I was of course assuming that the implied server meant web server.

                    Hi,
                    Thanks for your answears.

                    So, the web server is only on one machine. On all other servers there are only Perl scripts. It can be a Windows or Linux machines so it could be very universal way.
                    Thanks

                      On all other servers there are only Perl scripts

                      Why are you calling them servers? Exactly what kind of requests are they expecting?

                        4 days later
                        thorpe wrote:

                        Why are you calling them servers? Exactly what kind of requests are they expecting?

                        They are other services (other than web servers) servers (Active Directory, NAT, and so one).

                          Write a Reply...