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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To show cgi result on .html page

Status
Not open for further replies.

tetxa

Programmer
Dec 20, 2002
13
FI
hi,
i think this is not a big problem, but i could`t get answer on it by my self.
so i have installed apache 1.3 and perl 5.6.1
i have perl script what i have planned to execute when i arrive on html page. script works with straight command
but when i put this line on html page
<!--#include virtual=&quot;/cgi-bin/script.cgi&quot;-->
noting happens, only &quot;basic&quot; stuff appears.

regards,
Tet
 
so, i find some information from far history.
what i have done for now:
i have this in httpd.conf: Options +Includes
and these are unmarked: AddType text/html .shtml
AddHandler server-parsed .shtml
page is named in .shtml

still not working..
-Tet
 
and yes, i try to use .shtml extension.
is there more what i should do?
-Tet
 
Hi mate,

What you are using is an html comment, not an SSI directive.

You need to be careful and add spaces at the correct places etc.

Try using the following code instead:

<!--#exec cgi=&quot;/cgi-bin/script.cgi&quot; -->

If this doesn't work, check the source of the page and see if that directive appears in it, it should be either the cgi output or a space that appears instead.

Hope this helps Wullie

- Send your e-mail to santa!! [santa]

The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
hi,
i pasted <!--#exec cgi=&quot;/cgi-bin/script.cgi&quot; --> in page, and it didnt work. when i check html`s source, that line is there as comment.

information what i got from apache tutorial is:
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 ``hit counter.''

<!--#include virtual=&quot;/cgi-bin/counter.pl&quot; -->
so, the html line should be correct.
 
ok, i got it to work.
Options +Includes
was pasted in wrong place at httpd.conf file.
thanks you all for helping!

-Tet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top