#!/usr/bin/perl
print "Content-Type: text/html; charset=ISO-8859-1\n\n";
print "Hello, world";
...and put it in this html file:
<html>
<head></head>
<body>
<!--#exec cgi="/cgi-bin/helloworld.pl" -->
</body>
</html>
And the page will properly display "Hello, World".
However, if I add an argument to the script call:
...
<body>
<!--#exec cgi="/cgi-bin/helloworld.pl?myarg=5" -->
</body>
...
I get the dreaded "[an error occurred while processing this directive]"
Are arguments forbidden for some reason?
It's a Linux Apache server.
Thanks for any help.
[edited by: sugarkane at 11:35 pm (utc) on Dec. 1, 2003]
Sigh... Well, there goes another of my assumptions blown out of the water. I truly thought that "include" meant that it would try to print that file onto the screen, and "exec" meant that it would run the file.
Your suggestion worked, btw. Thanks. Next you're going to tell me there isn't a Santa Claus, right?
Lots of places have taken to disabling all forms of "exec" in SSI and using "include virtual" instead, which may be why you were having the problem.
:-)
JK
[edited by: jatar_k at 10:05 pm (utc) on Dec. 3, 2003]