Adventures with SSI - output from Apache 1.3

File testssi.shtm

Lets see the default errmsg; it may end with a linefeed!
<!--#include file="nofile0" --> [an error occurred while processing this directive]
<!--#flastmod file="testssi.shtm" --> <!--#fsize file="testssi.shtm" -->
testssi.shtm Tuesday, 15-Feb-2011 07:20:36 EST size 10k ←See default timefmt and sizefmt.

<!--#config errmsg="Unable to parse <b>SSI-1</b>" --> ←Change errmsg.
<!--#config timefmt="%Y-%m-%d %H:%M:%S" --> ←Set date format--use dashes.
<!--#set var="pagedate" value="${LAST_MODIFIED}"--> ←Set server variable of testssi.shtm date.
<script type="text/javascript"> var jspagedate = '<!--#echo var="LAST_MODIFIED"-->';</script> ←Set javascript variable of testssi.shtm date.
<!--#echo var="LAST_MODIFIED" --> 2011-02-15 07:20:36 ←See date with dashes.
<!--#include file="nofile1" --> Unable to parse SSI-1 ←Check and compare errmsg.
<!--#include file="testssi.htm" -->

File testssi.htm

<!--#config errmsg="Unable to parse <b>SSI-2</b>" --> ←Change errmsg.
<!--#config timefmt="%Y/%m/%d   %H:%M:%S" --> ←Change date format--use slashes.
<!--#echo var="SERVER_SOFTWARE" --> ←Note which server software is running.
<!--#exec cmd="date" --> ←Check if #exec works.
<!--#echo var="LAST_MODIFIED" --> ←See date with slashes. Is it date of include file or requested file?
<!--#include file="nofile" --> ←See new errmsg.
Pagedate javascript:
Pagedate server var: ←If Unable err then #set does not work.

File testssi.shtm

<!--#include file="nofile2" --> Unable to parse SSI-1 ←Did errmsg remain changed "-2" or restored "-1".
<!--#include file="testssi.xls" -->

File testssi.xls

<!--#config errmsg="Unable to parse <b>SSI-X</b>" --> ←Change errmsg.
<!--#config timefmt="%Y:%m:%d   %H:%M:%S" --> ←Change date format--use colons.
<!--#echo var="SERVER_SOFTWARE" --> ←Note which server software is running.
<!--#exec cmd="date" --> ←Check if #exec works.
<!--#echo var="LAST_MODIFIED" --> ←See date with colons. Is it date of include file or requested file?
<!--#include file="nofile" --> ←See new errmsg.
Pagedate javascript:
Pagedate server var: ←If Unable err then #set does not work.

File testssi.shtm

<!--#include file="nofile2" --> Unable to parse SSI-1 ←Did errmsg remain changed "-2" or restored "-1".
<!--#include file="testssi2.shtm"-->

File testssi2.shtm

<!--#echo var="novar" --> (none) ←Check the inherited errmsg.
<!--#config errmsg="Unable to parse <b>SSI-3</b>" --> ←Change errmsg.
<!--#config timefmt="%Y_%m_%d   %H:%M:%S" --> ←Change date format--use underscores.
<!--#echo var="SERVER_SOFTWARE" --> Apache/1.3.31 (HP MPE/iX WebWise A.04.00) mod_ssl/2.8.17 OpenSSL/0.9.7d ←Note which server software is running.
<!--#exec cmd="date" --> Tue Feb 15 12:21:06 UTC 2011 ←Check if #exec works.
<!--#echo var="LAST_MODIFIED" --> 2011_02_15 &nbsp; 07:20:36 ←See date with underscores. Is it date of include file or requested file?
<!--#include file="nofile" --> Unable to parse SSI-3 ←See new errmsg.
Pagedate javascript:
Pagedate server var: 2011-02-15 07:20:36 ←If Unable err then #set does not work.

File testssi.shtm

<!--#include file="nofile3" --> Unable to parse SSI-1 ←Did errmsg remain changed "-3" or restored.

<!--#config sizefmt="bytes" -->
<!--#fsize file="testssi.shtm" --> size of testssi.shtm 10,436

<!--#config sizefmt="abbrev" -->
<!--#fsize file="testssi.shtm" --> size of testssi.shtm 10k

<!--#flastmod file="testssi.htm" --> testssi.htm 2011-02-15 07:07:36 ←Note which date format is being used.
<!--#flastmod file="testssi.shtm" --> testssi.shtm 2011-02-15 07:20:36
<!--#config timefmt="%Y--%m--%d %H:%M:%S" --> ←Set date format--use double dashes.
<!--#flastmod file="testssi2.shtm" --> testssi2.shtm> 2011--02--15 07:07:51
<!--#printenv --> DOCUMENT_ROOT=/APACHE/PUB/htdocs HTTP_ACCEPT=*/* HTTP_ACCEPT_ENCODING=gzip, deflate HTTP_ACCEPT_LANGUAGE=en-us HTTP_CONNECTION=Keep-Alive HTTP_COOKIE=s_cc=true; s_sq=%5B%5BB%5D%5D HTTP_HOST=openmpe.com HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin REMOTE_ADDR=174.23.206.236 REMOTE_PORT=4645 SCRIPT_FILENAME=/APACHE/PUB/htdocs/openmpe/testssi.shtm SERVER_ADDR=71.42.191.6 SERVER_ADMIN=info@openmpe.com SERVER_NAME=Invent3k.openmpe.com SERVER_PORT=80 SERVER_SIGNATURE=<ADDRESS>Apache/1.3.31 Server at Invent3k.openmpe.com Port 80</ADDRESS> SERVER_SOFTWARE=Apache/1.3.31 (HP MPE/iX WebWise A.04.00) mod_ssl/2.8.17 OpenSSL/0.9.7d UNIQUE_ID=TVpvskjX4QkABQBr1sQ GATEWAY_INTERFACE=CGI/1.1 SERVER_PROTOCOL=HTTP/1.1 REQUEST_METHOD=GET QUERY_STRING= REQUEST_URI=/openmpe/testssi.shtm SCRIPT_NAME=/openmpe/testssi.shtm DATE_LOCAL=2011--02--15 07:21:06 DATE_GMT=2011--02--15 12:21:06 LAST_MODIFIED=2011--02--15 07:20:36 DOCUMENT_URI=/openmpe/testssi.shtm DOCUMENT_PATH_INFO= USER_NAME=MGR.OPENMPE DOCUMENT_NAME=testssi.shtm ssipagedate=2011-02-15 07:20:36

<!--#echo var="AUTH_TYPE" --> (none)
<!--#echo var="CONTENT_LENGTH" --> (none)
<!--#echo var="CONTENT_TYPE" --> (none)
<!--#echo var="DATE_GMT" --> 2011--02--15 12:21:06
<!--#echo var="DATE_LOCAL" --> 2011--02--15 07:21:06
<!--#echo var="DOCUMENT_NAME" --> testssi.shtm
<!--#echo var="DOCUMENT_PATH_INFO" -->
<!--#echo var="DOCUMENT_ROOT" --> /APACHE/PUB/htdocs
<!--#echo var="DOCUMENT_URI" --> /openmpe/testssi.shtm
<!--#echo var="GATEWAY_INTERFACE" --> CGI/1.1
<!--#echo var="HTTP_CACHE_CONTROL" --> (none)
<!--#echo var="HTTP_CONNECTION" --> Keep-Alive
<!--#echo var="HTTP_COOKIE" --> s_cc=true; s_sq=%5B%5BB%5D%5D
<!--#echo var="HTTP_HOST" --> openmpe.com
<!--#echo var="HTTP_REFERRER" --> (none)
<!--#echo var="HTTP_USER_AGENT" --> Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
<!--#echo var="HTTPS" --> (none)
<!--#echo var="INSTANCE_ID" --> (none)
<!--#echo var="INSTANCE_META_PATH" --> (none)
<!--#echo var="LAST_MODIFIED" --> 2011--02--15 07:20:36
<!--#echo var="LOCOL_ADDR" --> (none)
<!--#echo var="LOGON_USER" --> (none)
<!--#echo var="PATH" --> /bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin
<!--#echo var="PATH_INFO" --> (none)
<!--#echo var="PATH_TRANSLATED" --> (none)
<!--#echo var="QUERY_STRING" -->
<!--#echo var="QUERY_STRING_UNESCAPED" --> (none)
<!--#echo var="REMOTE_ADDR" --> 174.23.206.236
<!--#echo var="REMOTE_HOST" --> (none)
<!--#echo var="REMOTE_IDENT" --> (none)
<!--#echo var="REMOTE_PORT" --> 4645
<!--#echo var="REQUEST_METHOD" --> GET
<!--#echo var="REMOTE_USER" --> (none)
<!--#echo var="REQUEST_URI" --> /openmpe/testssi.shtm
<!--#echo var="SCRIPT_FILENAME" --> /APACHE/PUB/htdocs/openmpe/testssi.shtm
<!--#echo var="SCRIPT_NAME" --> /openmpe/testssi.shtm
<!--#echo var="SERVER_ADDR" --> 71.42.191.6
<!--#echo var="SERVER_ADMIN" --> info@openmpe.com
<!--#echo var="SERVER_NAME" --> Invent3k.openmpe.com
<!--#echo var="SERVER_PORT" --> 80
<!--#echo var="SERVER_PROTOCOL" --> HTTP/1.1
<!--#echo var="SERVER_SIGNATURE" --> <ADDRESS>Apache/1.3.31 Server at Invent3k.openmpe.com Port 80</ADDRESS>
<!--#echo var="SERVER_SOFTWARE" --> Apache/1.3.31 (HP MPE/iX WebWise A.04.00) mod_ssl/2.8.17 OpenSSL/0.9.7d
<!--#echo var="TZ" --> (none)
<!--#echo var="UNIQUE_ID" --> TVpvskjX4QkABQBr1sQ
<!--#echo var="USER_NAME" --> MGR.OPENMPE

Discoveries of using SSI with Apache 1.3 on MPE and Microsoft-IIS/6.0

  1. Apache - Default errmsg: [an error occurred while processing this directive]
    MS IIS - Default errmsg: Error processing SSI file
    (linefeed included)

  2. Apache - Default timefmt: "%A %B %d %Y"
    MS IIS - same.

  3. Apache - Default sizefmt: abbrev
    MS IIS - same.

  4. Apache - supports SSI elements: #printenv #set
    MS IIS - DOES NOT support SSI elements: #printenv #set

  5. Apache - ONLY files with SSI extensions (shtm) are processed for SSI commands.
    MS IIS - ALL included files are processed for SSI commands.

  6. Apache - errmsg is a local setting for each included file.
    MS IIS - errmsg is a global setting for all included files.

  7. Apache - sizefmt=abbrev includes unit letter: k m
    MS IIS - sizefmt=abbrev has NO unit letter

  8. Apache - timefmt is a local setting for each included file.
    MS IIS - same.

  9. Apache - var LAST_MODIFIED in an included file is of the requested page.
    MS IIS - var LAST_MODIFIED in an included file is of the included file.

These default and differing functionalities may be server configurable.
With the use of javascript, you may be able to code around the unsupported features.
The above example uses javascript variable jspagedate to get the LAST_MODIFIED
date of the requested page to use in an include file.

SSI also has #if #elif #else #endif for making dynamic decisions in page rendering.
But I have not yet tested them.
2011/02/15 Keven Miller