Config file

From Sit
Jump to: navigation, search

From v3.45 onwards, you can configure all settings (except database connection settings) by logging into SiT with admin permissions and selecting SiT! | Control Panel | Configure. See Configuring for more information.

Contents

config.inc.php

After you've installed SiT! you will have a file named config.inc.php in your main SiT directory This file initially contains only the most basic settings (for example database connection settings), the configuration page within SiT is normally used for everything else, but you can also add extra settings to this file.

When SiT! is configured we advise you to make the config.inc.php file read only, this will prevent any possibility of setup.php being used maliciously to compromise your installation.

$CONFIG['application_webpath']

This is the URL path to SiT! from the browsers perspective, for example if you access sit via http://www.example.com/support/ you would use /support/ as this setting.

$CONFIG['db_hostname']

The host name or IP address of your MySQL database server, in most cases this will be localhost.

$CONFIG['db_username']

The username for the connection to the MySQL database.

$CONFIG['db_password']

The password for the connection to the MySQL database.

$CONFIG['db_database']

The database name to use. The default database name is sit.

$CONFIG['db_tableprefix']

If the database you are using is shared with other applications you should set a table prefix, e.g. sit_

$CONFIG['attachment_fspath']

The full absolute file system path to a directory to store attachments in (with a trailing slash). This directory should be writable

Advanced settings

While you can configure all other settings by logging into SiT with admin permissions and selecting SiT! | Control Panel | Configure, it is also possible (although not normally recommended) to set config variables via the config file.

Refer to the lib/defaults.inc.php file for a full list of config variables that can be used in config.inc.php .

To alter a setting, first copy the setting line from defaults.inc.php over to the config.inc.php before you change it, as the defaults.inc.php file will be overwritten when you upgrade.

Advanced configurations

SiT looks for it's configuration in a number of files in turn, each overwriting the configuration specified in the previous file. These are the files SiT looks at, in order:

  1. includes/defaults.inc.php - Never modify this file as it will be overwritten when you upgrade
  2. /etc/sit.conf - Used for Linux/Unix systems
  3. includes/config.inc.php - The usual configuration file (recommended)

It's not normally recommended or desirable to use more than one config file, use either /etc/sit.conf or config.inc.php, not both.

See Also

Personal tools
project