Configuration
Variables
If anything doesn't work as expected it's most likey that some of the variables internal to dbengine.cgi are not configured properly.
Therefore open the file you specified during setup as configuration file and/or the CGI itself in your favorite editor and change the few available variables to values that are valid for your local system as follows:
$config_file (in dbengine.cgi)
default: "/usr/local/httpd/cgi-bin/dbengine/dbengine.conf"
Location of the configuration file generated by Makefile.PL during setup. This file contains most of the other variable initialisations. Therefor it is absolutely neccessary that this file reference in dbengine.cgi is correct.
@path_to_local_modules (in dbengine.cgi)
default: /usr/local/lib/perl5
This can hold a reference to the directory where your perl extensions have been installed.
$dbasetype
no default
This has to be set to either of the values postgres, mysql or oracle.
$server
default: "localhost"
Domain of the server where your database lives. The default value should most likely work for you. (PostgreSQL only)
$port
default: "5432"
Port of the database server as specified for the compilation of PostgreSQL. The default value should most likely work for you. (PostgreSQL only)
$user
default: "postgres"
User to access the database with. (PostgreSQL only)
$passwd
default: ""
Password (if any) to access the database using $user. (PostgreSQL only)
$defdb
default: "cis" [Oracle: "cis/zwerg"]
Postgres: |
Name of the default database which will be used in case no database
is specified when the CGI is called. |
Oracle: |
Name of the default user which will be used in case no user
is specified when the CGI is called followed by "/" and the password
which is required to access the tables of this user. |
$descdb
default: "cisinfo" [Oracle: "cisinfo/zwerg"]
Postgres: |
Name of default database with additional display and relation
informations. If there's no such database available and no valid alternative
given wen the CGI is called dbengine will try to find its information
in the database that conatains your standard data. |
Oracle: |
Name of default user with additional display and relation
informations followed by "/" and the password which is required to access
the tables of this user. If there's no such user available and no valid
alternative given wen the CGI is called dbengine will try to find its
information in the database that conatains your standard data. |
$oraTWOTASK
default: ""
TWO_TASK environment variable for access to external databases which don't reside on the local machine. (Oracle only)
$oraSID
default: "CIS"
ORACLE_SID environment variable as reference to the database dbengine shall use. (Oracle only)
$oraSID
default: "/opt/oracle/actual/product/8.0.5"
ORACLE_HOME environment variable as reference to the local database installation directory. (Oracle only)
$htdocs
default: "/usr/local/httod/htdocs/"
Absolute UNIX path to the document-root directory of your WWW Server.
$abs_cgi
default: "/usr/local/httpd/cgi-bin/dbengine/"
Absolute UNIX path to directory where dbengine.cgi shall be installed.
default: "/usr/local/httpd/cgi-bin/dbengine/template/"
Absolute UNIX path to folder where template .html files can be stored for processing. dbengine will use these to create pages with your data on the fly that look nicer then what comes out of the default algorithm.
$tmp
default: "/tmp/"
dbengine sometimes generates temporary web pages which have to be saved to files. Therefore you'll have to create a folder which is writable for the HTTP server and accessable for our CGI.
I simply created a folder called "/tmp" inside my htdocs folder. Set this variable to the "absolute" path to a folder for temporary .html files.
"Absolute" for this path means always relative to your httpd document root directory since this is "abolute" for any .html files. Therefore this can be considered an "absolute http path".
$language
default: english
If you want dbengine to provide German output you should set this to "german".
$bgcol
default: "#C4DDFF"
Background color for the generated pages. The default is a light blue.
$bgPath
default: "/bgimages/"
This one has to be set to the absolute http path to the folder where optional background images for the to generated frames are saved.
"Absolute" for this path means always relative to your httpd document root directory.
$bgType
default: ".jpeg"
Filename extension to be used for the automatic generation of backgrund image names.
If a file "$htdocs$bgPath$dbase$bfType" exists this will be used a background image for the current database with name $dbase.
$menuBackground
default: "menuBG.jpeg"
Default filename for the optionally integrated backgrund images in the menu frame. The file has to be located in $htdocs$bgPath.
This one will be overridden if a file "$htdocs$bgPath$dbase$bfType" exists this will be used a background image for the current database with name $dbase.
$mainBackground
default: "mainBG.jpeg"
Default filename for the optionally integrated backgrund images in the main frame. The file has to be located in $htdocs$bgPath.
$smarttable
default: "1"
Turn on or off the display of smart tables. Can be set to "0" or "1".
$maxwidth
default: "45"
Maximum width of an automatically generated text field.
To make your database appereance more configurable dbengine needs a couple of additional tables. These are used to store information about the look of your records on the screen and other information used by dbengine.
Keep in mind that dbengine always displays a list of ALL tables a database provides in the left frame. Therefore it makes no sense in most cases to store the internal fields in the same database region as your user tables.
For Oracle there's a concept that allows for different user tables on the same database. Also due to the more complex setup mechanism for additional databases I decided to store everything in the same database, but use different users to access either "user tables" or "dbengine tables".
Following are the sqlplus commands you need to setup the two users on your default database that will be accessed by the default parameters of dbengine:
drop user cis cascade;
drop user cisinfo cascade;
create user cis identified by zwerg;
create user cisinfo identified by zwerg;
grant connect, resource to cis;
grant connect, resource to cisinfo;
For PostgreSQL there's an optional automatic database setup for two different databases (i.e. cis and cisinfo) provided during make install
. The same is true for MySQL.