Adventures with SSI

File testssi.shtm

Lets see the default errmsg; it may end with a linefeed!
<!--#include file="nofile0" --> Error processing SSI file

<!--#flastmod file="testssi.shtm" --> <!--#fsize file="testssi.shtm" -->
testssi.shtm Wednesday February 16 2011 size 11 ←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-16 10:52:54 ←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" --> Microsoft-IIS/8.5 ←Note which server software is running.
<!--#exec cmd="date" --> Unable to parse SSI-2 ←Check if #exec works.
<!--#echo var="LAST_MODIFIED" --> 2011/02/15   12:04:18 ←See date with slashes. Is it date of include file or requested file?
<!--#include file="nofile" --> Unable to parse SSI-2 ←See new errmsg.
Pagedate javascript:
Pagedate server var: Unable to parse SSI-2 ←If Unable err then #set does not work.

File testssi.shtm

<!--#include file="nofile2" --> Unable to parse SSI-2 ←Did errmsg remain changed "-2" or restored "-1".
<!--#include file="testssi.xls" -->
File testssi.xls
<!--#config errmsg="Unable to parse <b>SSI-X</b>" --> <!--#config errmsg="Unable to parse SSI-X" --> ←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.Microsoft-IIS/8.5
<!--#exec cmd="date" --> ←Check if #exec works.Unable to parse SSI-2
<!--#echo var="LAST_MODIFIED" --> ←See date with colons. Is it date of include file or requested file?2020:11:18   07:40:48
<!--#include file="nofile" --> ←See new errmsg.Unable to parse SSI-2
Pagedate javascript:
Pagedate server var: ←If Unable err then #set does not work.Unable to parse SSI-2

File testssi.shtm

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

File testssi2.shtm

<!--#echo var="novar" --> Unable to parse SSI-2 ←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" --> Microsoft-IIS/8.5 ←Note which server software is running.
<!--#exec cmd="date" --> Unable to parse SSI-3 ←Check if #exec works.
<!--#echo var="LAST_MODIFIED" --> 2011_02_15   12:04:18 ←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: Unable to parse SSI-3 ←If Unable err then #set does not work.

File testssi.shtm

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

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

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

<!--#flastmod file="testssi.htm" --> testssi.htm 2011-02-15 12:04:18 ←Note which date format is being used.
<!--#flastmod file="testssi.shtm" --> testssi.shtm 2011-02-16 10:52:54
<!--#config timefmt="%Y--%m--%d %H:%M:%S" --> ←Set date format--use double dashes.
<!--#flastmod file="testssi2.shtm" --> testssi2.shtm> 2011--02--15 12:04:18
<!--#printenv -->

<!--#echo var="AUTH_TYPE" -->
<!--#echo var="CONTENT_LENGTH" --> 0
<!--#echo var="CONTENT_TYPE" -->
<!--#echo var="DATE_GMT" --> 2024--04--25 21:45:35
<!--#echo var="DATE_LOCAL" --> 2024--04--25 15:45:35
<!--#echo var="DOCUMENT_NAME" --> E:\www\MillerKeven\reeltapetransfer\www\testssi.shtm
<!--#echo var="DOCUMENT_PATH_INFO" --> Unable to parse SSI-3
<!--#echo var="DOCUMENT_ROOT" --> E:\www\MillerKeven\reeltapetransfer\www
<!--#echo var="DOCUMENT_URI" --> /testssi.shtm
<!--#echo var="GATEWAY_INTERFACE" --> CGI/1.1
<!--#echo var="HTTP_CACHE_CONTROL" --> Unable to parse SSI-3
<!--#echo var="HTTP_CONNECTION" --> Unable to parse SSI-3
<!--#echo var="HTTP_COOKIE" --> Unable to parse SSI-3
<!--#echo var="HTTP_HOST" --> www.3kranger.com
<!--#echo var="HTTP_REFERRER" --> Unable to parse SSI-3
<!--#echo var="HTTP_USER_AGENT" --> Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
<!--#echo var="HTTPS" --> off
<!--#echo var="INSTANCE_ID" --> 9
<!--#echo var="INSTANCE_META_PATH" --> /LM/W3SVC/9
<!--#echo var="LAST_MODIFIED" --> 2011--02--16 10:52:54
<!--#echo var="LOCOL_ADDR" --> Unable to parse SSI-3
<!--#echo var="LOGON_USER" -->
<!--#echo var="PATH" --> Unable to parse SSI-3
<!--#echo var="PATH_INFO" --> /testssi.shtm
<!--#echo var="PATH_TRANSLATED" --> E:\www\MillerKeven\reeltapetransfer\www\testssi.shtm
<!--#echo var="QUERY_STRING" -->
<!--#echo var="QUERY_STRING_UNESCAPED" -->
<!--#echo var="REMOTE_ADDR" --> 18.217.6.114
<!--#echo var="REMOTE_HOST" --> 18.217.6.114
<!--#echo var="REMOTE_IDENT" --> Unable to parse SSI-3
<!--#echo var="REMOTE_PORT" --> 56794
<!--#echo var="REQUEST_METHOD" --> GET
<!--#echo var="REMOTE_USER" -->
<!--#echo var="REQUEST_URI" --> /testssi.shtm
<!--#echo var="SCRIPT_FILENAME" --> E:\www\MillerKeven\reeltapetransfer\www\testssi.shtm
<!--#echo var="SCRIPT_NAME" --> /testssi.shtm
<!--#echo var="SERVER_ADDR" --> 209.90.117.252
<!--#echo var="SERVER_ADMIN" --> Unable to parse SSI-3
<!--#echo var="SERVER_NAME" --> www.3kranger.com
<!--#echo var="SERVER_PORT" --> 80
<!--#echo var="SERVER_PROTOCOL" --> HTTP/1.1
<!--#echo var="SERVER_SIGNATURE" --> Unable to parse SSI-3
<!--#echo var="SERVER_SOFTWARE" --> Microsoft-IIS/8.5
<!--#echo var="TZ" --> Unable to parse SSI-3
<!--#echo var="UNIQUE_ID" --> Unable to parse SSI-3
<!--#echo var="USER_NAME" --> Unable to parse SSI-3
<!--#include file="testssiv.shtm" --> ←Check variable values from include.

File testssiv.shtm


<!--#echo var="AUTH_TYPE" -->
<!--#echo var="CONTENT_LENGTH" --> 0
<!--#echo var="CONTENT_TYPE" -->
<!--#echo var="DATE_GMT" --> Thursday April 25 2024
<!--#echo var="DATE_LOCAL" --> Thursday April 25 2024
<!--#echo var="DOCUMENT_NAME" --> E:\www\MillerKeven\reeltapetransfer\www\testssiv.shtm
<!--#echo var="DOCUMENT_PATH_INFO" --> Unable to parse SSI-3
<!--#echo var="DOCUMENT_ROOT" --> E:\www\MillerKeven\reeltapetransfer\www
<!--#echo var="DOCUMENT_URI" --> /testssiv.shtm
<!--#echo var="GATEWAY_INTERFACE" --> CGI/1.1
<!--#echo var="HTTP_CACHE_CONTROL" --> Unable to parse SSI-3
<!--#echo var="HTTP_CONNECTION" --> Unable to parse SSI-3
<!--#echo var="HTTP_COOKIE" --> Unable to parse SSI-3
<!--#echo var="HTTP_HOST" --> www.3kranger.com
<!--#echo var="HTTP_REFERRER" --> Unable to parse SSI-3
<!--#echo var="HTTP_USER_AGENT" --> Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
<!--#echo var="HTTPS" --> off
<!--#echo var="INSTANCE_ID" --> 9
<!--#echo var="INSTANCE_META_PATH" --> /LM/W3SVC/9
<!--#echo var="LAST_MODIFIED" --> Wednesday February 16 2011
<!--#echo var="LOCOL_ADDR" --> Unable to parse SSI-3
<!--#echo var="LOGON_USER" -->
<!--#echo var="PATH" --> Unable to parse SSI-3
<!--#echo var="PATH_INFO" --> /testssi.shtm
<!--#echo var="PATH_TRANSLATED" --> E:\www\MillerKeven\reeltapetransfer\www\testssi.shtm
<!--#echo var="QUERY_STRING" -->
<!--#echo var="QUERY_STRING_UNESCAPED" -->
<!--#echo var="REMOTE_ADDR" --> 18.217.6.114
<!--#echo var="REMOTE_HOST" --> 18.217.6.114
<!--#echo var="REMOTE_IDENT" --> Unable to parse SSI-3
<!--#echo var="REMOTE_PORT" --> 56794
<!--#echo var="REQUEST_METHOD" --> GET
<!--#echo var="REMOTE_USER" -->
<!--#echo var="REQUEST_URI" --> /testssi.shtm
<!--#echo var="SCRIPT_FILENAME" --> E:\www\MillerKeven\reeltapetransfer\www\testssi.shtm
<!--#echo var="SCRIPT_NAME" --> /testssi.shtm
<!--#echo var="SERVER_ADDR" --> 209.90.117.252
<!--#echo var="SERVER_ADMIN" --> Unable to parse SSI-3
<!--#echo var="SERVER_NAME" --> www.3kranger.com
<!--#echo var="SERVER_PORT" --> 80
<!--#echo var="SERVER_PROTOCOL" --> HTTP/1.1
<!--#echo var="SERVER_SIGNATURE" --> Unable to parse SSI-3
<!--#echo var="SERVER_SOFTWARE" --> Microsoft-IIS/8.5
<!--#echo var="TZ" --> Unable to parse SSI-3
<!--#echo var="UNIQUE_ID" --> Unable to parse SSI-3
<!--#echo var="USER_NAME" --> Unable to parse SSI-3

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/16 Keven Miller