createdb - create database


<createdb $db $syspass $publicpass>

The createdb function creates a new database whose path is given by $db. The passwords for _SYSTEM and PUBLIC are given as arguments. For security, the _SYSTEM password $syspass is required to be at least 6 characters and contain punctuation. The PUBLIC password $publicpass may be empty.

Note that unlike the DB directive, which affects all other SQL commands, the database for createdb is specified at run time. Thus, createdb can be used in an administrative script to create new databases.

createdb returns "Creating database succeeded" on success, or "Creating database failed" or nothing on error.


<createdb "/usr/local/mydb" "Klaatu!" "">

The createdb function was added Oct. 10 1996.

The path given to createdb is absolute, not relative to the HTML documents tree, and is not checked. It is up to the programmer to verify the path before calling createdb, e.g. to check whether the Web user is permitted to access the dir, etc.


Copyright © Thunderstone Software     Last updated: Jul 17 2021
Copyright © 2021 Thunderstone Software LLC. All rights reserved.