Page is a not externally linkable
- Code, Content, and Presentation
-- Perl Server Side CGI Scripting
---- cgi script embedded in html doesn't like arguments


enchant - 10:12 pm on Dec 1, 2003 (gmt 0)


I've got embedded cgi scripts working. That is, I can take this cgi script called /cgi-bin/helloworld.pl:

#!/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]


Thread source:: http://www.webmasterworld.com/perl/3352.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com