Panix, New York's first
Internet Service Provider


Working with Server Side Includes on Panix


Server-side includes allow you add dynamic content to your HTML web pages. Some resources with basic information on SSIs are listed below.

Wikipedia:
http://en.wikipedia.org/wiki/Server_Side_Includes
CGI Programming on the World Wide Web, by Shishir Gundavaram, pub. O'Reilly:
http://oreilly.com/catalog/cgi/excerpt/ch05.html
Apache tutorial:
http://httpd.apache.org/docs/2.2/howto/ssi.html

exec cmd

exec cmd does not work as expected on Panix. It is insecure and we do not recommend using it. If you absolutely must, you may place your compiled binaries within your document root, and call them using a relative path.

To replace calls to exec cmd with calls to exec cgi or include virtual, you must prepend the output of the script with the proper CGI headers.

print ("Content-type:text/plain\n\n");
before any other output. It doesn't matter whether you output a content type of text/plain or text/html, as the browser will interpret the data within the scope of the calling document.

exec cgi vs. include virtual

You cannot pass new query information as part of an SSI exec cgi directive. The QUERY_STRING of the current SSI script will be passed to the CGI script. You cannot change them! If you want to pass different parameters, use include virtual.

absolute vs. relative paths

exec cgi and include virtual both require a URL path as their argument. If the URL path begins with slash, it will be looked up from your domain's web document root; if not, it will be looked up relative to the current SSI document. An absolute path called in a personal web context might look something like /~username/pcgi-bin/script.cgi


Return to Index

Last Modified Thursday, 10-Mar-2011 17:29:45 EST