To install WDB is quite easy - but you need a few other products like an HTTP server, a database system, and an interface between Perl an your database system. (Installing these are actually the hard part).
To make things a little bit more complicated, WDB supports several different database systems and the exact installation procedures varies slightly depending on which database system you are going to use. The following are therefore generic instructions, that are common for all database systems. Support of the different databases are implemetet through a sperate database interface module (DBI) for each database system. Specific details, and exceptions are documentet in the notes for the individual WDB DBI's.
At the time of writing this document three database systems are supportet : Sybase, Informix and mSQL. Notes for these interfaces are included in the Appendix.
WDB is written in Perl, but we need to add some commands to your Perl interpreter to enable it to talk to your database. Fortunately packages with these commands are already available on the Internet. There are sybperl for Sybase, oraperl for Oracle, isqlperl for Informix, etc.. These are all extremely usefull packages written by different people, with different needs, and different ideas. Unfortunately this means that they all use different commands to do the same things.....
To allow WDB to talk to all of them, it uses a separate database interface module for each database system, which is simply an encapsulation of the real database commands. All you have to do is to install Perl -- with the commands for your database -- and tell WDB which interface to use. If you do have a set of perl commands to access your database, but no WDB interface to them, you can write your own. See the appendix on porting to different databases for more details on this.
Before rushing out and grabbing the neareast version of the Perl source, make sure you get the right version. See the WDB DBI for your database system for details.
When you have downloaded and installed this : Make sure it works ! With the database interface to perl there are normaly included a few examples. Try to run these. (This might save you some headache later ...)
In the following when Perl or the Perl executable is mentioned it is always the version of the Perl executable which includes the database extensions that is meant.
To be able to interface to the World Wide Web you need a server that understands Hyper Text Transfer Protocol (HTTP). There are several of these server programs around. I use NCSA's HTTP server and have been happy with it, but any server should do, as long as it supports CGI scripts.
CGI is the Common Gateway Interface standard for how HTTP servers communicate with programs on the server. As these programs are started on request from the clients by simply referencing them in a URL like any other HTTP request, the server has to have some way of knowing when to send a file back to the client, and when to execute it and send the result back instead. This is normaly done by configuring the server to treat all files in a specified directory as CGI programs. There are a few other methods, but in the following I will assume that you have configured your HTTP server to use the /cgi-bin directory for this.
Online hypertext documentation including installation instructions, feature list, demonstration, etc. for the NCSA http server is available from :
http://hoohoo.ncsa.uiuc.edu/
Download the WDB distribution, and un-tar it. This will give you a set of sub-directories that needs to be installed by moving them to the appropriate places.
~http/wdb/
(if http is the user running the
HTTP server).
You will also need to create a directory to keep the FDF files. This directory does not have to be in the WWW tree, but it should be readable by the HTTP process.
Because the wdb script is started by the HTTP server, and we have little control over how it is started, and with what environment, you have to edit the first two lines of the wdb script :
#!/usr/server/arc/bin/sybperl $CONFIG_DIR = '/usr/local/etc/httpd/wdb';
Change the first line to point to your Perl interpreter that you installed earlier. The second line tells WDB where to find your local configuration files. Change this to the directory where you installed these. Also, make sure that wdb is executable
chmod +x wdb
Now update the configuration file.
To configure WDB to your local environment and preferences you have to edit the wdb.conf file in the conf directory (or wherever you copied it to).
The WDB configuration file contains the following configuration parameters :
%SPEC_NULL = ( 'int', -2147483647, 'smallint', -32768, );This tells WDB to interpret the value of -2147483647 (the smallest possible value) in an int field as NULL. If you don't need this, simply remove the definition of %SPEC_NULL from the configuration file.
The comments script is included in the WDB distribution in the cgi-bin/ directory. If you want to use this feature please install your own local copy of the script.