Configuration Options

During installation, 'config.php' is created with a base set of configuration options. This section of the documentation goes into detail on each option and what it is used for.

Keep in mind that the configuration is only loaded if 'proc.php' is executed. See the Execution Path documentation for more details.

Also, it is highly recommended that 'login.php' be moved to an obscure location and 'config.php' be cloned to that location. Not all changes to the configuration need to be replicated to the target location, but keeping both in sync is ideal.

Required Base Configuration

The base configuration options are a series of constants that are created using the define() keyword. Changing the core configuration may require additional changes of other files depending on the options that are changed.

HTTP_SERVER

Type: String [Constant]

Example: "barebonescms.com"

This specifies the HTTP web server for the site. The default is an empty string and the function BB_GetRequestHost() will dynamically calculate the location on an as-needed basis.

HTTPS_SERVER

Type: String [Constant]

Example: "ssl.barebonescms.com"

This specifies the HTTPS web server for the site. The default is an empty string and the function BB_GetRequestHost() will dynamically calculate the location on an as-needed basis. Typically used in conjunction with USE_HTTPS.

USE_HTTPS

Type: Boolean [Constant]

Example: true

Forces the login screen and the editor to only allow access over SSL (HTTPS). The current SSL status for the client is determined using BB_IsSSLRequest().

ROOT_PATH

Type: String [Constant]

Example #1: "/usr/local/apache/htdocs/testsite"

Example #2: "C:/Website/testsite"

This is the absolute path to the root of the Barebones CMS installation from the perspective of the web server. Do not add a trailing slash to the path.

ROOT_URL

Type: String [Constant]

Example: "/testsite"

This is the absolute URL to the root of the Barebones CMS installation from the perspective of the web browser (client). Do not add a trailing slash to the URL. If Barebones CMS is installed to the web root, then this should be an empty string.

SUPPORT_PATH

Type: String [Constant]

Example: "support"

This is the path to the 'support' subdirectory. Do not add a slash to the start or the end of the string.

WIDGET_PATH

Type: String [Constant]

Example: "widgets"

This is the path to the 'widgets' subdirectory. Do not add a slash to the start or the end of the string.

PLUGIN_PATH

Type: String [Constant]

Example: "plugins"

This is the path to the 'plugins' subdirectory. Do not add a slash to the start or the end of the string.

BASE_RAND_SEED

Type: String [Constant]

This is a randomly generated secret seed of bytes, in hexadecimal format, that helps to keep the main editor secure. Used during the session creation process.

BASE_RAND_SEED2

Type: String [Constant]

This is another randomly generated secret seed of bytes, in hexadecimal format, that helps to keep the main editor secure. Used during the session creation process.

DEV_SESSION_TIMEOUT

Type: Integer [Constant]

Example: 1296000

The number of seconds until a developer/programmer session expires after logging in.

DESIGN_SESSION_TIMEOUT

Type: Integer [Constant]

Example: 1296000

The number of seconds until a web designer session expires after logging in.

CONTENT_SESSION_TIMEOUT

Type: Integer [Constant]

Example: 1296000

The number of seconds until a content editor session expires after logging in.

Optional Base Configuration

The following configuration options are completely optional but could be useful. This is especially true if you want to connect to a database, send e-mail, etc. using the PHP files in the 'support' subdirectory.

USE_LESS_SAFE_STORAGE

Type: Boolean [Constant]

Example: false

Controls how content is saved to disk. By default, this is disabled and content is stored using a serialized, base64 encoded storage mechanism. When enabled, content is saved using var_export(), which makes files vastly more readable with a decrease in website security and minor performance improvement.

MYSQL_SERVER

Type: String [Constant]

Example: "localhost:3306"

The location of a MySQL server.

Note: Barebones CMS does not use a database but does include a class for accessing MySQL databases easily (support/mysql.php). This is just for convenience.

MYSQL_USER

Type: String [Constant]

The username to use to access the MySQL server.

MYSQL_PASS

Type: String [Constant]

The password to use to access the MySQL server.

SMTP_SERVER

Type: String [Constant]

Example: "localhost"

The location of a SMTP server.

Note: Barebones CMS does not use any e-mail functionality but does include functions for creating and sending MIME e-mails. This is just for convenience.

SMTP_PORT

Type: String [Constant]

Example: "25"

The port number of the SMTP server.

POP3_SERVER

Type: String [Constant]

Example: "localhost"

The location of a POP3 server.

Note: Barebones CMS does not use any e-mail functionality but does include functions for receiving and processing MIME e-mail from a POP3 server. This is just for convenience.

POP3_PORT

Type: String [Constant]

Example: "110"

The port number of the POP3 server.

SMTPPOP3_USER

Type: String [Constant]

The username to use to log into the SMTP and/or POP3 server.

SMTPPOP3_PASS

Type: String [Constant]

The password to use to log into the SMTP and/or POP3 server.

SMTP_FROM

Type: String [Constant]

Example: '"Our Company" <someaddress@somedomain.com>'

The e-mail address to use as the default "From" address.

Adding Global Options

The configuration file is a great place to store global configuration options for the entire site. Modifying 'config.php' to your own website's needs won't get in the way of applying future upgrades of the Barebones CMS.

© CubicleSoft