in reply to how to exec a CGI file with params?

I think you can (should) use include virtual instead of exec cgi...

From the apache mod_include docs:
If the specified URL is a CGI program, the program will be executed an +d its output inserted in place of the directive in the parsed file. Y +ou may include a query string in a CGI url: <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> include virtual should be used in preference to exec cgi to include th +e output of CGI programs into an HTML document.

Replies are listed 'Best First'.
Re^2: how to exec a CGI file with params?
by Anonymous Monk on Jun 17, 2006 at 20:35 UTC
    Hi.

    I can't get it to work yet. For the SSI I am using   <!--#include virtual="day.pl?show=all" --> Inside my day.pl script (it's loading without error now, but it's loading the main script, it's not catching on the param "show".

    my $show = url_param("show"); my $show1 = param("show"); . . if ($show ne "all" || $show1 ne "all") {
    I did show and show1, incase it wasn't passing as a URL param. Neither of them catch. Any idea why?
      To be able to answer your question, we need to see more of your CGI-program.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

        use warnings; use strict; use CGI::Carp qw(fatalsToBrowser); use CGI qw/:standard/; my $teaser_show = 3; # number of headlines to show in TEASER mode my $page_show = 50; # number of headlines to show on page my $intro = "Hi; # top message on screen when it's showing all +results print header, start_html(); my $show = url_param("show"); my $show1 = param("show"); if ($show ne "all" || $show1 ne "all") { print "no SHOW param was found"; } else { print "this prints if the param is found"; }
        Is what I am using right now