36 users online (0 members and 36 guests)  


  Results 1 to 3 of 3

Related

  1. Replies: 0
  2. Execute external program in perl/cgi    Forum: CGI Perl Forum
    Replies: 2
  3. Running a batch script file from Perl CGI    Forum: CGI Perl Forum
    Replies: 0
  4. Running shell commands from Perl    Forum: CGI Perl Forum
    Replies: 1
  5. I am running a *ree online perl workshop    Forum: CGI Perl Forum
    Replies: 2
  1. #1
    elsanto's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2008
    Posts
    1

    Running external program from CGI/Perl

    Hi all,

    I'm from Java and new to perl. I'd like to call from computer A a program on computer B, so to avoid any firewall or network settings, I decided to use port 80 and have an Apache server sitting on computer B that will get an HTTP request from A and run the program.
    So I started learning cgi scripting with Perl and I can get computer A to call basic commands on computer B like "dir" ...
    But when I do something more complex, like calling a prog.exe, the web page hangs, the prog.exe process is visible in the computer B task manager and nothing happens.
    Any advise is welcome
    Thanks a lot

  2. #2
    pageBuzz.com's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2006
    Posts
    21

    Re: Running external program from CGI/Perl

    The problem lies in teh program on computer B.

    Using an http request is just like accessing computer B with your browser. It is a good way to distribute resources without using NFS.

    I use the same process with a javascript call for my automotive webfeeds so webmasters can call searches from my main database.

    If the program is hanging then there is an error in the program itself. Try accessing the program directly with a browser and see what happens.

    You should get the same result.

    You will need to find the error in the program.
    Last edited by HTML; 09-17-2008 at 09:51 AM.

  3. #3
    xmassey's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Apr 2007
    Posts
    100

    Re: Running external program from CGI/Perl

    If you still have a problem I suggest you post your code

    Chris