• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

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

Hi,

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

0
bazbazbaz
Asked:
bazbazbaz
  • 2
  • 2
1 Solution
 
Perl_DiverCommented:
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.
0
 
bazbazbazAuthor Commented:
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
0
 
Perl_DiverCommented:
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/yourscript.pl?name=value&name=value&name=value" -->

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.
0
 
bazbazbazAuthor Commented:
Thats great, thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now