gunzip apache-1.3.X.tar.gz
tar -xvf apache-1.3.X.tar.gz
You don't need the Apache sources if you are building a shared
object module. You do, however, need the header files.
Some systems, such as Debian GNU/Linux, provide these
independently - otherwise, you probably still need the sources.
gunzip mod_dtcl-X.X.X.tar.gz
tar -xvf mod_dtcl-X.X.X.tar.gz
cd ../mod_dtcl/
Edit the builddtcl.sh script. The 3
variables you may need to change are:
TCLSHAPACHEINC
./builddtcl.sh shared
cp mod_dtcl.so
/usr/lib/apache/wherever/the/other/shared/objects/reside
For shared object builds, you need to copy the
object into the directory where the other shared
objects are kept for your Apache build. On Debian
GNU/Linux systems, for instance, this is in
/usr/lib/apache/1.3/.
cd apache-1.3.X/
./configure
cd ../mod_dtcl/
Edit the builddtcl.sh script. The 3
variables you may need to change are:
TCLSHAPACHEINC
./builddtcl.sh static
./builddtcl.sh install
cd ../apache-1.3.X
./configure
--activate-module=src/modules/mod_dtcl/mod_dtcl.a [ other configure
options ]
export EXTRA_LIBS="-ltcl8.X -lm"make -e
make install
LoadModule dtcl_module
/usr/lib/apache/1.3/mod_dtcl.soAddType application/x-httpd-tcl .ttmlAddType application/x-dtcl-tcl .tcl
(optional)Dtcl_Script GlobalInitScript "script""script" is actual Tcl
script, so to run a file, you would do
Dtcl_Script GlobalInitScript "source /var/www/foobar.tcl".
Dtcl_Script ChildInitScript "script"Dtcl_Script ChildExitScript "script"Dtcl_Script BeforeScript "script"hputs in the BeforeScript, but must
instead use buffer_add.
Dtcl_Script AfterScript "script"Dtcl_Script ErrorScript "script"Dtcl_CacheSize cachesizeDtcl_UploadFilesToVar 1/0buffer_add stringhputs ?-error? texthgetvarsinclude filenameparse filenamehflushheaders redirect uriheaders setcookie -name cookie-name
-value cookie-value ?-expires date/time? ?-domain domain?
?-path path? ?-secure?headers type
content-typeheaders set headername valuedtcl_info$::request::UPLOAD(filename)$::request::UPLOAD(name)$::request::UPLOAD(size)$::request::UPLOAD(type)$::request::UPLOAD(channelname)$::request::UPLOAD(data)tcl_init_stuff is called, which creates
a new interpreter, and initializes various things,
like the apache_channel channel system.
The caching system is also set up, and if there is a
GlobalScript, it is run.
send_parsed_file Each .ttml file is
loaded and run within its own namespace. No new
interpreter is created for each page. This lets you
share variables, and most importantly, loaded modules,
from a common parent (such as one of the InitScripts).
When a file is loaded, it is transformed into a Tcl
script by putting everything outside of <? and
?> into large hputs statements. When the script is
complete, it is then inserted into the cache, for
future use. In fact, if the file modification
information doesn't change, mod_dtcl will execute the
cached version of the script the next time it is
encountered.
USE_OLD_TAGS is set to 0 in
mod_dtcl.h. You can automatically change your
.ttml files to the new format by using the
newtags.sh script in the contrib/ directory.
Run it at the top level of your DocumentRoot.
headers setcookie command now uses the
-name and -value flags for those
arguments, whereas this was not necessary in the past.
The mod_dtcl mailing list is the best place to go for help when you have problems.
See the Contact page for information on sending mail/subscribing.
Mailing list archives are also available at http://archive.covalent.net, at the bottom of the page.