diff --git a/doc/htconfig.md b/doc/Config.md similarity index 72% rename from doc/htconfig.md rename to doc/Config.md index a2ce91d4d..2ffc0bf7e 100644 --- a/doc/htconfig.md +++ b/doc/Config.md @@ -1,8 +1,198 @@ -Config values that can only be set in .htconfig.php -=================================================== +Friendica Configuration +======================= * [Home](help) +Friendica's configuration is done in two places: in INI configuration files and in the `config` database table. +Database config values overwrite the same file config values. + +# File configuration + +The configuration format for file configuration is an INI string returned from a PHP file. +This prevents your webserver from displaying your private configuration it interprets the configuration files and displays nothing. + +A typical configuration file looks like this: + +```php + +table.config { + margin: 1em 0; + background-color: #f9f9f9; + border: 1px solid #aaa; + border-collapse: collapse; + color: #000; + width: 100%; +} + +table.config > tr > th, +table.config > tr > td, +table.config > * > tr > th, +table.config > * > tr > td { + border: 1px solid #aaa; + padding: 0.2em 0.4em +} + +table.config > tr > th, +table.config > * > tr > th { + background-color: #f2f2f2; + text-align: center; + width: 50% +} + + +
.htconfig.php | +config/local.ini.php | +
---|---|
+$db_host = 'localhost'; +$db_user = 'mysqlusername'; +$db_pass = 'mysqlpassword'; +$db_data = 'mysqldatabasename'; +$a->config["system"]["db_charset"] = 'utf8mb4'; + |
+ +[database] +hostname = localhost +username = mysqlusername +password = mysqlpassword +database = mysqldatabasename +charset = utf8mb4 + |
+
+$a->config["section"]["key"] = "value"; + |
+ +[section] +key = value + |
+
+$a->config["section"]["key"] = array( + "value1", + "value2", + "value3" +); + |
+ +[section] +key[] = value1 +key[] = value2 +key[] = value3 + |
+
+$a->config["key"] = "value"; + |
+ +[config] +key = value + |
+
+$a->path = "value"; + |
+ +[system] +urlpath = value + |
+
+$default_timezone = "value"; + |
+ +[system] +default_timezone = value + |
+
+$pidfile = "value"; + |
+ +[system] +pidfile = value + |
+
+$lang = "value"; + |
+ +No equivalent (yet) + |
+