How to execute a perl script on remote host

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ColinQin

    How to execute a perl script on remote host

    Hi All,

    Now i have 2 servers A and B, A is a production server (the running web
    app is writen with php) and B is a CVS server.

    When i click a button in the running web app, i need to execute a perl
    script on CVS server.

    How can i do this?

    Thanks

  • ColinQin

    #2
    Re: How to execute a perl script on remote host

    I found ssh2_exec() can help me to do this, but my php version is
    4.3.9.
    It seems no ssh2_exec() support, is there any similiar method?

    "ColinQin дµÀ£º
    "
    Hi All,
    >
    Now i have 2 servers A and B, A is a production server (the running web
    app is writen with php) and B is a CVS server.
    >
    When i click a button in the running web app, i need to execute a perl
    script on CVS server.

    How can i do this?

    Thanks

    Comment

    • Erwin Moller

      #3
      Re: How to execute a perl script on remote host

      ColinQin wrote:
      I found ssh2_exec() can help me to do this, but my php version is
      4.3.9.
      It seems no ssh2_exec() support, is there any similiar method?
      Hi,

      Is ServerB running a webserver (Apache)?
      In that case you can simply call some URL, and put the perlscript under it.

      eg:



      If some freak wants to tease you he can call that script too, so maybe add
      an IP-restriction on it. If it is not coming from serverA, don't do a
      thing.

      I agree having ssh2_exec() would be a bit easier. :-)

      Good luck

      Regards,
      Erwin Moller
      >
      "ColinQin ???
      "
      >Hi All,
      >>
      >Now i have 2 servers A and B, A is a production server (the running web
      >app is writen with php) and B is a CVS server.
      >>
      >When i click a button in the running web app, i need to execute a perl
      >script on CVS server.
      >>
      >How can i do this?
      >>
      >Thanks

      Comment

      Working...