You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

194 lines
14 KiB

2 years ago
; +----------------------------------------------------------------------------+
; | This file is part of the Mojavi package. |
; | Copyright (c) 2003, 2004 Sean Kerr. |
; | |
; | For the full copyright and license information, please view the LICENSE |
; | file that was distributed with this source code. You can also view the |
; | LICENSE file online at http://www.mojavi.org. |
; | -------------------------------------------------------------------------- |
; | MOJAVI DATABASE CONNECTIVITY CONFIGURATION |
; | -------------------------------------------------------------------------- |
; | CATEGORIES: |
; | |
; | The main category [databases] is required. This specifies connection names |
; | used to retrieve a database connection from this configuration. Each name |
; | should match up with a value that is the name of another existing category |
; | that specifies the exact configuration for that particular database |
; | connection. The only requirement is that a default database be setup with |
; | the name of 'default'. This way a connection can be retrieved without |
; | specifying a connection name. This always retrieves the default database |
; | connection. |
; | |
; | NOTES: |
; | |
; | 1. Each database implementation has its own set of parameters. View the |
; | class source code or the API to get a list. |
; | 2. All database implementations provide three methods of specifying |
; | connectivity data: normal, server, and env. With normal, you specify |
; | the information in this file, which means all of it is plain-text |
; | and may pose a security risk. Using the server or env methods, you |
; | specify your connectivity information in the $_SERVER or $_ENV arrays |
; | where the information is not directly viewable. When using the server |
; | or env methods, the information you enter as the parameter value is |
; | the array key the database implementation will use to retrieve the |
; | actual value from the array. Here's a short example: |
; | |
; | param.user = "DB_USER" |
; | param.password = "DB_PASS" |
; | param.database = "DB_DBNAME" |
; | param.method = "server" |
; | |
; | When doing the above, the database class will retrieve the information |
; | from $_SERVER, where $_SERVER['DB_USER'] is your username, |
; | $_SERVER['DB_PASS'] is your password, and $_SERVER['DB_DBNAME'] is your |
; | database name. |
; | |
; | Using the server method for storing information allows you to hide |
; | otherwise viewable connection information. The most notable way of |
; | using the server method is to set the information via an Apache |
; | <VirtualHost> directive using SetEnv NAME "VALUE". When doing so, your |
; | $_SERVER array is populated with the data. Here's a short example: |
; | |
; | <VirtualHost 192.168.0.1> |
; | ServerName secret.domain.tld |
; | DocumentRoot /www/secret.domain.told |
; | SetEnv DB_USER "MyUser" |
; | SetEnv DB_PASS "SecretPassword" |
; | SetEnv DB_DBNAME "MyDatabase" |
; | </VirtualHost> |
; | -------------------------------------------------------------------------- |
; | REQUIRED KEYS: |
; | |
; | 1. class - The class name providing the custom implementation. |
; | |
; | OPTIONAL KEYS: |
; | |
; | 1. file - The filesystem path to the class file. If the path is relative, |
; | it will be relative to the MO_WEBAPP_DIR Mojavi application |
; | setting. |
; | -------------------------------------------------------------------------- |
; | EXAMPLES: |
; | |
; | [databases] example: |
; | |
; | [databases] |
; | |
; | default = "Default" |
; | creole = "Creole" |
; | |
; | Standard PostgreSQL setup: |
; | |
; | [DBName] |
; | |
; | class = "PostgreSQLDatabase" |
; | |
; | param.user = "JoeSchmoe" |
; | param.password = "SecretPassword" |
; | param.database = "MyDatabase" |
; | |
; | Standard PostgreSQL setup with host and port: |
; | |
; | [DBName] |
; | |
; | class = "PostgreSQLDatabase" |
; | |
; | param.user = "JoeSchmoe" |
; | param.password = "SecretPassword" |
; | param.database = "MyDatabase" |
; | param.host = "192.168.0.1" |
; | param.port = "2345" |
; | |
; | Standard MySQL setup: |
; | |
; | [DBName] |
; | |
; | class = "MySQLDatabase" |
; | |
; | param.user = "JoeSchmoe" |
; | param.password = "SecretPassword" |
; | param.database = "MyDatabase" |
; | |
; | Standard MySQL setup with host and port: |
; | |
; | [DBName] |
; | |
; | class = "MySQLDatabase" |
; | |
; | param.user = "JoeSchmoe" |
; | param.password = "SecretPassword" |
; | param.database = "MyDatabase" |
; | param.host = "192.168.0.1" |
; | param.port = "2345" |
; | |
; | Creole setup using PostgreSQL: |
; | |
; | [DBName] |
; | |
; | class = "CreoleDatabase" |
; | |
; | param.username = "JoeSchmoe" |
; | param.password = "SecretPassword" |
; | param.database = "MyDatabase" |
; | param.hostspec = "localhost" |
; | param.phptype = "pgsql" |
; | |
; | Creole setup using MySQL and DSN style connectivity: |
; | |
; | [DBName] |
; | |
; | class = "CreoleDatabase" |
; | |
; | param.dsn = "mysql://user:pass@host/dbname" |
; | -------------------------------------------------------------------------- |
; | PARAMETER KEYS: |
; | |
; | Parameter keys specify a parameter name and value to be passed to the |
; | initialization method of the class instance. Any number of parameters can |
; | be passed. |
; | |
; | param.<name> = "<value>" |
; | |
; | Parameter keys can also be used to pass an array of values instead of a |
; | single value. |
; | |
; | param.<name>.1 = "<value1>" |
; | param.<name>.2 = "<value2>" |
; | |
; | For a list of available parameters for a class, browse the class source |
; | or documentation. |
; | -------------------------------------------------------------------------- |
; | KEYWORDS: |
; | |
; | The following keywords may exist in file or param values as well as the |
; | category. |
; | |
; | 1. %MO_APP_DIR% |
; | 2. %MO_LIB_DIR% |
; | 3. %MO_MODULE_DIR% |
; | 4. %MO_WEBAPP_DIR% |
; +----------------------------------------------------------------------------+
; [databases]
; default = "Default"
; conn2 = "MySQL"
; [Default]
; class = "PostgreSQLDatabase"
; param.user = ""
; param.password = ""
; param.database = ""
; param.host = ""
; param.port = ""
; [MySQL]
; class = "MySQLDatabase"
; param.user = ""
; param.password = ""
; param.database = ""
; param.host = ""
; param.port = ""