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

<!--#exec cgi="bannertest.pl?name=top" -->
The script loads fine when loaded in the browser but it doesn't load [an error occurred while processing this directive] in my .shtml. I have 4 other scripts that do work but none of them are using ?param= so is that the problem? The shtml and pl file are in the same folder.

Replies are listed 'Best First'.
Re: Exec cgi with params?
by atemon (Chaplain) on Aug 10, 2007 at 01:41 UTC

    Hi,

    With Apache, you cannot give arguments to the cgi with #exec.

    In Apache documentation, it says

    The include virtual element should be used in preference to exec cgi. In particular, if you need to pass additional arguments to a CGI program, using the query string, this cannot be done with exec cgi, but can be done with include virtual,

    you may use

    <!--#include virtual="bannertest.pl?name=top" -->
    for details refer to mod_include. Hope this helps.

    Cheers !

    --VC



    There are three sides to any argument.....
    your side, my side and the right side.