Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How do you pass info to perl through an SSI call on a web page?

by sedhed (Scribe)
on Jul 26, 2002 at 17:38 UTC ( #185609=note: print w/replies, xml ) Need Help??


in reply to How do you pass info to perl through an SSI call on a web page?

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&param2=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!

  • Comment on Re: How do you pass info to perl through an SSI call on a web page?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://185609]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2021-12-02 14:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (22 votes). Check out past polls.

    Notices?