Menu

On the fly database Log in to Edit

On the fly database

Databases definitions created through the web interface are not stored as cgi files.
They are stored in "data dictionary" files, in a special directory.

Quick how-to:

Essential settings

Copy the "db" directory under the server root, make script executables.
Verify settings for each script:
db/use -> perl path, woda directory, name of woda engine.
db/dir -> perl path, path to woda and data dir.

Configure your web server to serve "db" content as cgi files. As an alternative, this can be set in a .htaccess file.
Sample for Apache:

<Directory /var/www/www/db>
    # execute cgi files
    Options ExecCGI
    # all files here are cgi
    SetHandler cgi-script
</Directory>

If your data dir (wdat) is outside (or "below") server root, you must define these setting in your woda.conf:

$ENV{DOCUMENT_ROOT}     = '/absolute/path/to/server/root'; 
$DATADIRDIR     = '/absolute/path/to/data/dir';
$USEURL         = '/url/to/db/use';  relative or absolute ??????????????????

Test it!

It will not be fully automatic, but it is enough to test.
Launch a database: as admin user, go to http://url-of-a-database/NewTableMenu

  • choose "Create a database of any structure"
  • type 2 or 3 fields and validate (keep default "aaa" password)
    Chances are that you will not be able to use the urls on the next page.
    Browse to your data dir, you will see a new directory, named like "x1234". Copy that name.
    Now go to http://your-server/db/use/x1234/U=admin&P=aaa/Home
  • if it doesn't work, verify your web server config
    Use the "Modify database definition" menu in the administration page to modify your database (you can also test your new defi
    The data directory "data dir/x1234" contains a _datadict/dd.txt file. That file is your database definition file. It is not a

Setup the database of databases

The dir script is a database. It will populate itself every hour by default.
Configure the script (path to woda, data dir, etc.), launch it and make a search 2 times.
The second search will show a list of created databases.

Help user to create

To ease db creation, you can define a dummy database, its only purpose is to launch the creation functions and the documentat
Put some links somewhere...

Rewrite url

Add this directive in server configuration

ScriptAliasMatch ^/([A-Z].*) /path/to/db/test

Templates

Create some [[Templates database templates]]

Restrictions

  • use dd.pl to overwrite any user defined setting.
  • $TEMPLATEDIR/lib is a place for requireFile
  • define $HIDDENWBF, $HIDDENWBB and $HIDDENCGI globally in woda.conf or for each database using requireFile or templates

Related

Documentation Wiki: AdministratorManual