rbi has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I have a perl code using CGI.pm that runs a dynamic website for modelling atmospheric dispersion of pollutants. This cgi application uses databases, forks external processes in Fortran for computation of results, and IDL (http://www.rsinc.com) for producing graphics. The system runs under Apache/Linux.

I'm now asked to transform this application in such a way that it can be still accessed through the web browser interface, but run (the cgi, fortran and IDL) locally (i.e. without internet connection to a remote server) on users' computers, maybe using different operating systems (Windows, Linux, other Unix-like).

What should I study about to create perl installation packages for each of these operating systems, that can check the existence of the web server, and the location of cgi-executable directories?

Is there some small web server that can be installed on several platforms that can just interpret my cgi and fork the processes, independently from the presence of Apache or something else?

Thanks for your attention, I hope my question is clear enough...

Roberto
  • Comment on Running locally a cgi application on different platforms

Replies are listed 'Best First'.
Re: Running locally a cgi application on different platforms
by MZSanford (Curate) on Sep 05, 2002 at 15:55 UTC
    I don't know of any off the top of my head, but a bit of perl-foo and HTTP::Daemon may work, depending on the client machines. Just a thought.
    from the frivolous to the serious
Re: Running locally a cgi application on different platforms
by sauoq (Abbot) on Sep 05, 2002 at 18:39 UTC
    Is there some small web server that can be installed on several platforms that can just interpret my cgi and fork the processes, independently from the presence of Apache or something else?

    Although there are small httpds available for either platform, I don't know of one that supports both. Brewing up your own with HTTP::Daemon could quickly turn into a large project.

    Have you considered bundling your own minimal distribution of Apache? This would certainly work on Unix where you can easily have two Apache servers running. I suspect you could do the same on Windows. (Can someone else say for sure?)

    This would solve the very messy problem of trying to find an existing web server and making your stuff work nicely with it. Besides, as your software already runs on Apache, you wouldn't have to waste effort on making the transition to another server platform.

    -sauoq
    "My two cents aren't worth a dime.";
    
Re: Running locally a cgi application on different platforms
by Mr. Muskrat (Canon) on Sep 05, 2002 at 18:10 UTC

    Apache is available for multiple platforms: linux, windows, etc...

    If you really don't need it to run as a CGI application in a browser, then check out Perl/Tk and Wx. They allow you to write a program with a GUI. Of course, you would need to rewrite your program. ;)