If you run a perl program using SSI, does it fork a new process each time, like CGI?

Posted on 2006-05-18
Last Modified: 2013-12-25

I am trying to compare web development using Java - jsp,servlet and Perl - SSI,CGI. I know that CGI forks a new process for a perl program each time (unless you use mod_perl), but I dont know if this is the same for SSI calling a perl program?

I just want to know do the same inefficiencies apply to SSI? Also, SSI cant do as much as CGI - right? What exactly cant SSI do?

Thanks in advance

Question by:bazbazbaz
    LVL 8

    Accepted Solution

    Each time an SSI tag runs a perl script a new process is started on the server. All the SSI tag is doing is invoking the perl script to run just like starting a CGI process, so I have to assume they are the same as far as the server goes. Hopefully you are running your perl scripts from a non-web accesible folder when you use SSI, otherwise your scripts could be triggered from calling the URI of the script.

    Author Comment

    I'm not really using them, I'm just trying to compare them in theory.

    If I want to talk about Perl for web development, I can talk about CGI, and SSI - which are very much alike really, yes? I you can use SSI to run a perl script like CGI?

    Just a general comparison is all i need. Thanks
    LVL 8

    Expert Comment

    It's  possible to use SSI to invoke a perl scriptc  similar to a CGI request. You would use the virtual tag and append any necessary data to the URI string.

    <!--#include virtual="../cgi-bin/" -->

    which would be subject to the restrictions of the GET method. SSI is a poor mans scripting language, but is still useable for simple things. If you are doing anything complicated PHP or other scripting language is probably gpoing to be much better, certainly more powerful.

    Author Comment

    Thats great, thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at (http://www.experts-ex…
    It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
    Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
    Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now