m (, => ;) |
No edit summary |
||
Line 1: | Line 1: | ||
{{TOCright}} | |||
These settings are stored in the Settings.php file in your SMF directory. The format of each option is as follows: | These settings are stored in the Settings.php file in your SMF directory. The format of each option is as follows: | ||
Latest revision as of 11:16, 3 August 2014
These settings are stored in the Settings.php file in your SMF directory. The format of each option is as follows:
$setting_name = 'value'; # Optional comment.
Where value has any quotation marks (') or backslash (\) inside it escaped with a backslash (' => \' and \ => \\.) The file must also begin with <?php and end with ?>. The file used in the installation package is a good template.
$boarddir
- Version: SMF 1.0+
- Default value: the directory in which Settings.php is located.
This sets the directory where SMF is installed. It's used to locate files like Settings.php, SSI.php, agreement.txt, and the Packages directory. No trailing slash (/) should be added.
$boardurl
- Version: SMF 1.0+
- Default value: 'http://127.0.0.1/smf'
The URL to your forum's directory, without the trailing slash (/). This URL is used throughout SMF - all dynamically generated URLs (except those with their own settings) are based on this setting.
$cookiename
- Version: SMF 1.0+
- There is no default value; it could be something like 'SMFCookie683'
Name of the cookie to set for authentication purposes. Changing this value will cause everyone to be logged out.
$db_type
- Version:2.0+
- Default value: mysql
2.0 and higher versions support several different database versions, if you do not know what database type you are using it is suggested not to change this value.
$db_error_send
- Version: SMF 1.0+
- Default value: 1
Enables (1) or disables (0) sending an email to the Administrator on a database connection or query error. This function is limited to sending only one email per every three days. The email address it sends to is configured by the $webmaster_email setting.
$db_last_error
- Version: SMF 1.0+
- Default value: (not set)
A variable, which stores the Timestamp of the last database connection error. This is not really a setting (and isn't set by default), but merely an internally used variable to prevent multiple emails from being sent after a connection error. See also the $db_error_send setting. As of 2.1 this has been moved to its own file db_last_error.php and is no longer in the Settings.php file.
$db_name
- Version: SMF 1.0+
- Default value: 'smf'
The name of the database. This database must exist, and must have SMF's tables and data in it.
$db_passwd
- Version: SMF 1.0+
- Default value:
Password for access to the database server. It is not recommended to change this unless the password to the database has actually been changed.
$db_persist
- Version: SMF 1.0+
- Default value: 0
Enable (1) or disable (0) persistent connections for connecting to the database. A persistent connection keeps the connection active to increase performance (although in many cases the gain is minimal.) If you aren't on a dedicated server, this may cause you problems with your host. Please see PHP's documentation on persistent database connections for more information.
$db_prefix
- Version: SMF 1.0+
- Default value: 'smf_'
The prefix of the database tables. During installation, SMF will add about 30 tables to the database. Each of which will use the prefix that was configured during the installation procedure. For example, if the prefix is 'smf_', the tables will be given the names 'smf_attachments', 'smf_boards', 'smf_messages', etc. If you want to install another Forum or software package in the same database, simply chose a different prefix, and the tables won't interfere with each other.
$db_show_debug
- Version: SMF 1.0+
- Default value: (not set)
If set, enables query debug features -- full text of SQL queries will be displayed before execution. These are very useful for debugging purposes. To enable add $db_show_debug = true;
to your Settings.php file before the closing ?>. Keep in mind that once this is enabled the output is shown to everyone.
$db_server
- Version: SMF 1.0+
- Default value: 'localhost'
Hostname or IP of the database server. If the database server is on the same machine as the webserver, it's safe (and considerably more efficient!) to use 'localhost' for this setting. Otherwise, either an IP address or a web address (hostname) is required. Note that database specifically requires the hostname connecting to the database server to be granted permission to connect.
$db_user
- Version: SMF 1.0+
- There is no default for this, it will vary depending on how the admin has it setup.
Name of the database user connecting to the database. It is not recommended to use the root user.
$language
- Version: SMF 1.0+
- Default value: 'english'
The default language file set for the forum. This language will be used for all guests (unless they choose otherwise) and members who have not chosen a language in their profile. SMF will always try to get the language file of the language set by a user first. If a language file for some reason cannot be found in the user's language files, it will fall back to the file corresponding to this setting.
- Tip: Adding ?language=xyz; after index.php allows guests to choose a language, if it is installed.
$maintenance
- Version: SMF 1.0+
- Default value: 0
Sets whether the Forum is in maintenance mode or not.
- 0 Maintainance mode off. The Forum can be used normally.
- 1 Maintainance mode on. Only administrators can use the Forum as usual. Other users get a 'this Forum is in maintenance mode' message. The database may still be accessed for user authentication (so as to tell if the Member is an administrator.)
- 2 Maintainance mode on, full force. Freezes the forum. No one can access it, not even administrators. This setting will leave the database untouched (as far as the SMF Forum is concerned) but cannot be set from the administration center. This setting is used by SMF's upgrade tool to ensure an undisturbed upgrade.
$mbname
- Version: SMF 1.0+
- Default value: 'My Community'
The name of your forum. This is used in the title and footer of your Forum pages, as the name of the sender of email notifications and on the footer of each email message sent by your forum.
$mmessage
- Version: SMF 1.0+
- Default value: 'Okay faithful users...we\'re attempting to restore an older backup of the database...news will be posted once we\'re back!'
Description of why the Forum is in maintenance mode. Is shown when the $maintenance setting is set to 1 or 2.
$mtitle
- Version: SMF 1.0+
- Default value: 'Maintenance Mode'
Title for the Maintenance Mode message. Is only shown when the $maintenance setting is set to 1 or 2.
$mysql_set_mode
- Version: SMF 1.1+
- Default value: (not set)
If this is set to true (not in quotes) SMF will automatically set the sql_mode and AUTOCOMMIT to those options which it expects. It's best to have this off, if possible, because SMF only expects the defaults, and changing them is another query per page view. This is not present in Settings.php by default.
$sourcedir
- Version: SMF 1.0+
- Default value: The Sources sub directory of the path Settings.php is located in.
The path to where the source files are stored. No trailing slash (/) is allowed.
$webmaster_email
- Version: SMF 1.0+
- Default value: '[email protected]'
Email address from which to send all Topic notifications, Personal message notifications, newsletters, etc. This address also receives database error warnings, should they occur.
Main
Configuration
- Core Features
- Features and Options
- Security and Moderation
- Languages
- Server settings
- Current Theme
- Themes and Layout
- Modification Settings
Forum
Members
Maintenance
Miscellaneous
- Security Tips
- Building Your Community
- Performance enhancements
- Modifications - A mod broke my forum what should I do