Fellow monks I question on the recommended way of calling mod_perl scripts from an Server Side Include HTML page on Apache (1.3+) server.

My company's website has a number of Html pages created by our graphics designers. We are already using Server Side Includes to add in standard headers and footers. I am working on adding in capability to dynamically generate images that will be shown on some of these pages.

I am not too worried about writting the script itself, but I not very sure about to call the script from SSI tags.

Some research showed following three options:

  1. using <!--#include virtual=
  2. using <!--#include exec=
  3. using <!--#include perl=

Option 1 (virtual):

With this it looks like I have to have the mod_perl script accessible externally for it work. ie. instead of the script being accessible only from SSI tags, Apache permissons have to be setup so that the script could be accessed directrly. I tried adding "deny from all" to the directory that holds the script but then the script could not be called even from SSI.

Option 2 (exec):

Does not allow me to pass any parameters to the script. I need to be able to pass some configuration parameters.

Option 3 (perl):

I only found hints about this option, I could not find much information about it. I Apparently need to set PERL_SSI to 1 while building mod_perl. Not sure if this is a good idea.

Being new to mod_perl developement, I would appreciate any insight into which is the recommended way and if there is a way around the issue with option 1.


Just a tongue-tied, twisted, earth-bound misfit. -- Pink Floyd


In reply to calling mod_perl script from SSI page by data64

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.