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

ssi and cgi error

Status
Not open for further replies.

rickict

IS-IT--Management
Apr 29, 2005
18
GB
hi i am trying to run a cgi script using SSI.

i have cgi and SSI running fine (or so i think) on a windows xp apachi server .

when i run the cgi script:
<a href="../cgi-bin/hello.cgi">click</a><br />
all works fine. and prints "hello world".

when i run the SSI command:
<!--#echo var="DATE_LOCAL" -->
it prints the date .

but when trying to combine the two using:
<!--#exec cgi="../cgi-bin/hello.cgi" -->
i iget [an error occurred while processing this directive].

what have am i not doing to get SSI to execute cgi.
ive tryed other CGI's ie counters and the same thing happens.

thanks
 
exec cgi" can work, but I would also use "include virtual" instead. Is your CGI script is printing an http header before printing anything to the screen? Even though you call the CGI in an SSI tag, the CGI script still has to print a header I believe.
 
Kevin is right AFAIK, the same is true for javascript produced by cgi scripts

print "Content-Type: text/html\n\n"; at the top of your CGI, better if you're using CGI.pm then print header();

For JavaScript
print "Content-Type: text/javascript\n\n";

--Paul

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top