httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kirk Jackson <k...@mcs.vuw.ac.nz>
Subject Re: [users@httpd] CGI/SSI Issue
Date Tue, 05 Nov 2002 03:16:35 GMT

How about using the SSI include tag, which does a full subrequest to your CGI:

<!--include virtual="/cgi-bin/script.cgi?call/tofile.txt"-->


Kirk

On Mon, 04 Nov 2002 22:03:11 -0500
Tom Ray <tom@blazestudios.com> wrote:

> Tried that and while it no longer gives me an error, the script does not 
> function right..here is the script. I'm really stumped as to why this is 
> happening...
> 
> #!/usr/bin/perl
> print "Content-type:text/html\n\n";
> $file = $ENV{'INC_QUERY_STRING'};
> $filename = "/the/web/path/to/the/$file";
> open (INF, "$filename") || dienice;
> $list = <INF>;
> close(INF);
> $item  = $list[rand(@list)];
> print $item;
> sub dienice {
>   my($errmsg) = @_;
>   print "Error:$errmsg\n";
>   print "<P>hit it</p>";
>   exit;
> }
> 
> Chris Taylor wrote:
> 
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >Isn't the function of exec cgi to invoke a system call with the CGI
> >program prefixed, ie it would become a system request for:
> >
> >perl /cgi-bin/script.cgi?call/tofile.txt
> >
> >If that's the case then I'd guess you should stick the
> >call/tofile.txt as an argument to the perl script than a URL-type
> >encoding?
> >
> >Well, that's my vague, late-night complete guess :)
> >
> >HTH.
> >
> >Chris Taylor - chris@x-bb.org - The guy with the PS2 WebServer -
> >http://www.x-bb.org/chris.asc
> >
> >- ----- Original Message ----- 
> >From: "Tom Ray" <tom@blazestudios.com>
> >To: <users@httpd.apache.org>
> >Sent: Tuesday, November 05, 2002 1:46 AM
> >Subject: [users@httpd] CGI/SSI Issue
> >
> >
> >  
> >
> >>I'm having a small issue with a CGI script on a web server I just
> >>turned  up. My client is using a exec cgi SSI call to a perl script
> >>in his  cgi-bin, and that script uses a GET method to pull
> >>information for  various datafiles. So basically the call is
> >>
> >><!--exec cgi="/cgi-bin/script.cgi?call/tofile.txt"-->
> >>
> >>What happens when he runs the .shtml page is a error is logged in
> >>the  error_log file that says:
> >>
> >>Invalid CGI Ref "/cgi-bin/script.cgi?call/tofile.txt"
> >>
> >>Now if I remove the ?call/tofile.txt the error no longer works and
> >>the  script runs normally, however without that last bit of
> >>information the  script can't pull the data needed to populate the
> >>page.
> >>
> >>Anyone have any ideas, thoughts or suggestions? I've been looking
> >>this  over for almost two days now and I'm running out of ideas.
> >>
> >>TIA
> >>
> >>
> >>--------------------------------------------------------------------
> >>- The official User-To-User support forum of the Apache HTTP Server
> >>Project. See <URL:http://httpd.apache.org/userslist.html> for more
> >>info.
> >>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> >>For additional commands, e-mail: users-help@httpd.apache.org
> >>    
> >>
> >
> >-----BEGIN PGP SIGNATURE-----
> >Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> >
> >iQA/AwUBPcckZCqf8lmE2RZkEQKznwCfYS8uPq7B/9jtSie8PFxIXQxsa1UAoMk8
> >Jp5OIoCkKYHRf48mU8nAWeTU
> >=aXPi
> >-----END PGP SIGNATURE-----
> >
> >
> >
> >---------------------------------------------------------------------
> >The official User-To-User support forum of the Apache HTTP Server Project.
> >See <URL:http://httpd.apache.org/userslist.html> for more info.
> >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> >For additional commands, e-mail: users-help@httpd.apache.org
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message