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

I am using the exec command to execute a browser redirect cgi which works fine. The redirect script prints the appropriate SHTML pages. I wanted these SHTML pages to use an exec command to execute a counter cgi but nothing gets printed. If I go to the SHTML URL directly rather than using the redirect CGI the counter CGI executes fine.

Any Ideas why the second execute command wont work?
Thanks

In the begining Let us first assume that there was nothing to begin with.

Replies are listed 'Best First'.
Re: Need help with EXE command
by DamnDirtyApe (Curate) on Jul 16, 2002 at 17:38 UTC

    Are you sure exec is what you want to use for a counter? Keep in mind that it won't return when it is done. You may want to use system here instead.


    _______________
    D a m n D i r t y A p e
    Home Node | Email
      I possibly would like to use other cgi's other then counter.
      If the call for EXEC is <!--#exec cgi="/cgi-local/events.cgi" -->
      What is the call for SYSTEM
      Cal

        Sorry, I misunderstood. I thought you were talking about the Perl command exec, rather than what you're doing here. Since I'm not really familiar with this, all I can do is point you here for an example of how I've always seen counters done before.


        _______________
        D a m n D i r t y A p e
        Home Node | Email
Re: Need help with EXE command
by cfreak (Chaplain) on Jul 16, 2002 at 21:02 UTC

    You are talking about SSI calls. Which deal more with the Webserver rather than perl. If I understand you correctly you are calling an SSI exec directive from another SSI exec directive and you can't do that because the server doesn't parse the included exec or include files. Even if you could its not really a good practice (i.e. you should separate your webpages in very definable sections).

    You could use perl to parse out the SSI directives and call the programs or files yourself, but I think it would be far easier to rethink the design a bit so that your SSI calls are all on the page you are viewing.

    Hope that helps
    Chris

    Lobster Aliens Are attacking the world!