Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help passing parameters from HTML to Perl

Status
Not open for further replies.

tlogan

Programmer
Jun 26, 2001
33
US
Hello all! I would appreciate any help with the following problem.

I have a Perl script to retrieve data and send it back to an HTML page. If I run the script from the browser, it works perfectly:


However, I can't get it to run from an HTML page, as in:

<!--#exec cgi=&quot;/cgi-bin/get_pp_data.pl?category=1&quot;-->

error log only shows:

&quot; invalid CGI ref &quot;/cgi-bin/get_pp_data.pl?category=1&quot; &quot;


I've been searching both this CGI forum and the perl forum. I found and tried the <IFRAME>...</IFRAME> trick and it works, but that returns data in a frame and since I don't know how much data will be returned, it gets really cumbersome, not to mention ugly if I use scroll=yes.

Anyone have any ideas? You can use:


to see what I'm ultimately trying to do.


Thanks,
Tom
(the man without a snappy moniker)
 
From Apache's documentation for SSI, &quot;Including the results of a CGI program&quot;:
Including the results of a CGI program
This is one of the more common uses of SSI - to output the results of a CGI program, such as everybody's favorite, a &quot;hit counter.&quot;
<!--#include virtual=&quot;/cgi-bin/counter.pl&quot; -->

If not, it might be because you have a IncludesNOEXEC in your Options directive.

//Daniel
 
Thanks D!!!

The <!--#include virtual....--> seems to have done the trick. I don't know how I missed that one. I guess because everything else I've seen says to use <!--#exec cgi...--> and that's how I've done all of my other perl scripts on the site and they work fine, although none of those need a prarameter passed to them.

It would be interesting to know any other differences between the two. Anyone?

Thanks,
Tom
(the man without a snappy moniker)
 
Copied from BNB:
Exec scripts do not inherit all that great CGI Server/Client information that Virtual does.

Virtual scripts must be in a directory from which you can run CGI scripts.

//Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top