In this case, there could be a few things that would cause that error:
- The script could not be found. Try using the full path to /var/www/cgi-bin/config.pl or wherever. (In apache at least, you can start the path "/" at the document root, or "/cgi-bin/config.pl" in other words.
- The script was found, but did not return a proper header. This, in turn, can be caused by either by the script not compiling, or of course by the script running just fine, but never actually printing a header. Be sure your program prints a CGI->header() or "Content-Type: text/html\n\n" line.
Once you get the script to run, you can pass parameters to it by using the #include virtual style of SSI, like so:
<!--#include virtual="/cgi-bin/somescript.cgi?param1=test¶m2=3" --
+>
blokhead is correct, the server needs to recognize the html file as server-parsed, for which the normal convention is a .shtml extension. Sounds like you're already there though, because the "an error occurred while processing this directive" message embedded in your html page means the server tried to run your script, but couldn't, as stated above.
Hope this helps.
Cheers!
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|