Hi, com2004. Thanks for your question.
I have found two examples that this server-parsed HTML document
technology existed before November 1995.
The first example is PHP. The usenet post you referenced does contain
a link, however, this is long-dead. However, from what I have
discovered, PHP 1 (Or PHP/FI as it was called, from Personal Home Page
/ Form Interpreter) appears to have been a two-tier language.
It was originally a perl script, which, when called with the path of a
phtml file, parsed the PHP tags. A brief history is available from
http://uk.php.net//manual/phpfi2.php#history.
In addition, PHP.net also hosts the source of version 1.99s (but sadly
no version earlier). This source is available from
http://museum.php.net/php2/php-1.99s.tar.gz.
This distribution comes with several examples. One of them - which
connects to a mSQL database and iterates through various records
returned, is as follows:
<?
msqlsethost("localhost");
$name = "bob";
$result = msql($database,"select * from table where firstname='$name'");
$num = msql_numrows($result);
echo "$num records found!<p>";
$i=0;
while($i<$num);
echo msql_result($result,$i,"fullname");
echo "<br>";
echo msql_result($result,$i,"address");
echo "<br>";
$i++;
endwhile;
>
It has a similar syntax to perl (and to modern day PHP).
The changelog included with that distribution goes back to Sept. 1995,
and mentions the tags ('<?') a few times. It does not mention the
introduction of these tags, making it clear they were a part of the
language. It also mentions the 'force loading of either index.html or
Overview.html if the given path is a directory', showing it was
designed to parse HTML documents with additional tags.
Additionally, I have found a newsgroup posting from the beginning of
Nov. 1995 by Rasmus Lerdorf, the author of PHP, describing how to use
his software to display data from a database in a parsed document.
This post is available at
http://www.hughes.com.au/hypermail/msql-list/199511/0214.html. It
shows that this version of PHP was a two-tier language; it shows a mix
of PHP and HTML, the PHP enclosed with <?...> tags.
This posting obviously does not pre-date November, but it does
demonstrate that PHP 1.9x was a two-tier language.
The second possibility is the webserver itself, Apache. There is a
module which comes as standard with Apache called mod_include. This
module was used a lot more before PHP became popular, since it allowed
a webmaster to insert tags in a file with an .shtml suffix which would
then be parsed by the webserver.
These tags take the form of
<!--#a_command variable="value" [variable_2="bla"]-->.
They are evaluated by the webserver, and are parsed before the HTML
page reaches the viewer; neither they, nor their client software ever
see them. A brief summary is available from
http://httpd.apache.org/docs/mod/mod_include.html.
The earliest released version of Apache I can find was version 0.6.5,
which, according to http://www.webhistory.org/www.lists/www-talk.1995q3/0304.html,
was released on the 7th of August, 1995. Since this project has always
been open-source, the source code is available. There is an old
archive of the complete source for this version available at
http://ftp3.ru.freebsd.org/pub/WWW/servers/ncsa_httpd/Unix/apache_httpd/apache_0.6.5.tar.gz
.
Inside this distribution, the file we're interested in is the
apache_0.6.5/src/http_include.c file. This file is the original
version of the mod_include functionality present in the modern
releases of apache.
This functionality was developed by Rob McCool, who worked at NCSA.
Links on his homepage (which has been archived and is still accessible
at http://archive.ncsa.uiuc.edu/SDG/People/robm/sg.html) point to
another page at NCSA, http://hoohoo.ncsa.uiuc.edu/docs/.
This is the reference for the NCSA HTTPd program, the precursor to
Apache (and what Apache is based on). The documentation for the SSI
functionality is available from
http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html.
Basically, it allowed the following commands to be inserted into an shtml document:
'config': this command would allow some aspect of the environment to
be changed at runtime (specifically, time formats, file size formats,
and error messages).
'include': this would include a text file (without parsing it if it
even if it was executable)
'echo': output a specified variable (available variables were the
document's name, address, query string, date, and the date the
document was last modified).
'fsize': output the file size
'flastmod': output the last modified date
And, crucially, 'exec', which would execute a script or command.
The exec command would allow similar functionality to a (simple) PHP
script by executing a shell command, or more advanced functionality by
including the results of any CGI script, the path of which would
follow the command.
I hope this information was of use to you. If you have any questions
or additional information is required, please do not hesitate to
request a clarification.
--wildeeo |