Merge pull request #6199 from MrPetovan/task/move-config-to-php-array

Move config to PHP array
This commit is contained in:
Michael Vogel 2018-11-26 23:57:56 +01:00 committed by GitHub
commit ea4e772b1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 1117 additions and 1009 deletions

2
.gitignore vendored
View file

@ -11,6 +11,8 @@ home.html
robots.txt robots.txt
#ignore local config #ignore local config
/config/local.config.php
/config/addon.config.php
/config/local.ini.php /config/local.ini.php
/config/addon.ini.php /config/addon.ini.php

View file

@ -17,7 +17,7 @@ env:
install: install:
- composer install - composer install
before_script: before_script:
- cp config/local-sample.ini.php config/local.ini.php - cp config/local-sample.config.php config/local.config.php
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;' - mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
- mysql -utravis test < database.sql - mysql -utravis test < database.sql
- echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

View file

@ -114,7 +114,7 @@ password, database name).
4. If you know in advance that it will be impossible for the web server to 4. If you know in advance that it will be impossible for the web server to
write or create files in the config/ subfolder, create an empty file called write or create files in the config/ subfolder, create an empty file called
local.ini.php and make it writable by the web server. local.config.php and make it writable by the web server.
5. Visit your website with a web browser and follow the instructions. Please 5. Visit your website with a web browser and follow the instructions. Please
note any error messages and correct these before continuing. note any error messages and correct these before continuing.
@ -128,9 +128,9 @@ so in the host name setting for the database.
6. *If* the automated installation fails for any reason, check the following: 6. *If* the automated installation fails for any reason, check the following:
- "config/local.ini.php" exists - "config/local.config.php" exists
If not, edit local-sample.ini.php and change system settings. Rename If not, edit local-sample.config.php and change system settings. Rename
to local.ini.php to local.config.php
- Database is populated. - Database is populated.
If not, import the contents of "database.sql" with phpmyadmin If not, import the contents of "database.sql" with phpmyadmin
or mysql command line or mysql command line
@ -139,7 +139,7 @@ or mysql command line
Registration errors should all be recoverable automatically. Registration errors should all be recoverable automatically.
If you get any *critical* failure at this point, it generally indicates the If you get any *critical* failure at this point, it generally indicates the
database was not installed correctly. You might wish to move/rename database was not installed correctly. You might wish to move/rename
local.ini.php to another name and empty (called 'dropping') the database local.config.php to another name and empty (called 'dropping') the database
tables, so that you can start fresh. tables, so that you can start fresh.
**************************************************************************** ****************************************************************************
@ -184,7 +184,7 @@ Bad things will happen. Let there be a hardware failure, a corrupted
database or whatever you can think of. So once the installation of your database or whatever you can think of. So once the installation of your
Friendica node is done, you should make yoursef a backup plan. Friendica node is done, you should make yoursef a backup plan.
The most important file is the `config/local.ini.php` file in the base directory. The most important file is the `config/local.config.php` file in the base directory.
As it stores all your data, you should also have a recent dump of your As it stores all your data, you should also have a recent dump of your
Friendica database at hand, should you have to recover your node. Friendica database at hand, should you have to recover your node.
@ -281,21 +281,21 @@ Windows).
##################################################################### #####################################################################
- If you are unable to write the file config/local.ini.php during installation - If you are unable to write the file config/local.config.php during installation
due to permissions issues: due to permissions issues:
##################################################################### #####################################################################
create an empty file with that name and give it world-write permission. create an empty file with that name and give it world-write permission.
For Linux: For Linux:
% touch config/local.ini.php % touch config/local.config.php
% chmod 664 config/local.ini.php % chmod 664 config/local.config.php
Retry the installation. As soon as the database has been created, Retry the installation. As soon as the database has been created,
******* this is important ********* ******* this is important *********
% chmod 644 config/local.ini.php % chmod 644 config/local.config.php
##################################################################### #####################################################################
- Some configurations with "suhosin" security are configured without - Some configurations with "suhosin" security are configured without
@ -334,11 +334,12 @@ After a while I noticed, that bin/worker.php calls further php script via
proc_open. These scripts themselves also use proc_open and fail, because they proc_open. These scripts themselves also use proc_open and fail, because they
are NOT called with -d suhosin.executor.func.blacklist=none. are NOT called with -d suhosin.executor.func.blacklist=none.
So the simple solution is to put the correct parameters into config/local.ini.php: So the simple solution is to put the correct parameters into config/local.config.php:
[config] 'config' => [
; Location of PHP command line processor //Location of PHP command line processor
php_path = "/usr/bin/php -d suhosin.executor.func.blacklist=none -d suhosin.executor.eval.blacklist=none" 'php_path' => '/usr/bin/php -d suhosin.executor.func.blacklist=none -d suhosin.executor.eval.blacklist=none',
],
This is obvious as soon as you notice that the friendica-cron uses proc_open to This is obvious as soon as you notice that the friendica-cron uses proc_open to
execute php-scripts that also use proc_open, but it took me quite some time to execute php-scripts that also use proc_open, but it took me quite some time to

View file

@ -42,9 +42,14 @@ if ($a->getMode()->isInstall()) {
Config::load(); Config::load();
if (empty(Config::get('system', 'pidfile'))) { if (empty(Config::get('system', 'pidfile'))) {
die('Please set system.pidfile in config/local.ini.php. For example:'."\n". die(<<<TXT
'[system]'."\n". Please set system.pidfile in config/local.config.php. For example:
'pidfile = /path/to/daemon.pid'."\n");
'system' => [
'pidfile' => '/path/to/daemon.pid',
],
TXT
);
} }
$pidfile = Config::get('system', 'pidfile'); $pidfile = Config::get('system', 'pidfile');

View file

@ -86,8 +86,7 @@ cd /var/www
php bin/composer.phar install php bin/composer.phar install
# initial config file for friendica in vagrant # initial config file for friendica in vagrant
#cp /vagrant/util/htconfig.vagrant.php /vagrant/.htconfig.php cp /vagrant/util/local.config.vagrant.php /vagrant/config/local.config.php
cp /vagrant/util/local.ini.vagrant.php /vagrant/config/local.ini.php
# copy the .htaccess-dist file to .htaccess so that rewrite rules work # copy the .htaccess-dist file to .htaccess so that rewrite rules work
cp /vagrant/.htaccess-dist /vagrant/.htaccess cp /vagrant/.htaccess-dist /vagrant/.htaccess

View file

@ -56,13 +56,13 @@ define('EOL', "<br />\r\n");
* @brief Image storage quality. * @brief Image storage quality.
* *
* Lower numbers save space at cost of image detail. * Lower numbers save space at cost of image detail.
* For ease of upgrade, please do not change here. Set [system] jpegquality = n in config/local.ini.php, * For ease of upgrade, please do not change here. Set system.jpegquality = n in config/local.config.php,
* where n is between 1 and 100, and with very poor results below about 50 * where n is between 1 and 100, and with very poor results below about 50
*/ */
define('JPEG_QUALITY', 100); define('JPEG_QUALITY', 100);
/** /**
* [system] png_quality = n where is between 0 (uncompressed) to 9 * system.png_quality = n where is between 0 (uncompressed) to 9
*/ */
define('PNG_QUALITY', 8); define('PNG_QUALITY', 8);
@ -73,10 +73,12 @@ define('PNG_QUALITY', 8);
* this length (on the longest side, the other side will be scaled appropriately). * this length (on the longest side, the other side will be scaled appropriately).
* Modify this value using * Modify this value using
* *
* [system] * 'system' => [
* max_image_length = n; * 'max_image_length' => 'n',
* ...
* ],
* *
* in config/local.ini.php * in config/local.config.php
* *
* If you don't want to set a maximum length, set to -1. The default value is * If you don't want to set a maximum length, set to -1. The default value is
* defined by 'MAX_IMAGE_LENGTH' below. * defined by 'MAX_IMAGE_LENGTH' below.

View file

@ -0,0 +1,12 @@
<?php
// Addon configuration
// Copy this configuration file to addon.config.php and edit it if you want to configure addons, see below example for the twitter addon
return [
'twitter' => [
'consumerkey' => 'localhost',
'consumersecret' => 'mysqlusername',
],
];

View file

@ -1,10 +0,0 @@
<?php return <<<INI
; Copy this configuration file to addon.ini.php and edit it if you want to configure addons, see below example for the twitter addon
;[twitter]
;consumerkey = localhost
;consumersecret = mysqlusername
INI;
// Keep this line

View file

@ -1,429 +0,0 @@
<?php return <<<INI
; CONFIG.INI.PHP
; This file declares the default values for the base config of Friendica.
; These configuration values aren't accessible from the admin settings page and custom values must be set in config/local.ini.php
; Please don't edit this file directly as its content may change in the upcoming versions.
[database]
; host (String)
; Hostname or IP address of the database server.
; Can contain the port number with the syntax "hostname:port".
hostname =
; user (String)
; Database user name. Please don't use "root".
username =
; pass (String)
; Database user password. Please don't use empty passwords.
password =
; base (String)
; Database name.
database =
; charset (String)
; Database connexion charset. Changing this value will likely corrupt special characters.
charset = utf8mb4
[config]
; admin_email (Comma-separated list)
; In order to perform system administration via the admin panel, this must precisely match the email address of the person logged in.
admin_email =
; admin_nickname (String)
; Nickname of the main admin user, used if there are more than one admin user defined in config.admin_email.
admin_nickname =
; max_import_size (Integer)
; Maximum body size of DFRN and Mail messages in characters. 0 is unlimited.
max_import_size = 200000
; php_path (String)
; Location of PHP command line processor.
php_path = php
[system]
; allowed_link_protocols (Array)
; Allowed protocols in links URLs, add at your own risk. http is always allowed.
allowed_link_protocols[0] = ftp
allowed_link_protocols[1] = ftps
allowed_link_protocols[2] = mailto
allowed_link_protocols[3] = cid
allowed_link_protocols[4] = gopher
; always_show_preview (Boolean)
; Only show small preview picures.
always_show_preview = false
; archival_days (Integer)
; Number of days that we try to deliver content before we archive a contact.
archival_days = 32
; auth_cookie_lifetime (Integer)
; Number of days that should pass without any activity before a user who chose "Remember me" when logging in is considered logged out.
auth_cookie_lifetime = 7
; block_local_dir (Boolean)
; Deny public access to the local user directory.
block_local_dir = false
; cache_driver (database|memcache|memcached|redis)
; Whether to use Memcache or Memcached or Redis to store temporary cache.
cache_driver = database
; config_adapter (jit|preload)
; Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
config_adapter = jit
; curl_range_bytes (Integer)
; Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
curl_range_bytes = 0
; crawl_permit_period (Integer)
; Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
crawl_permit_period = 60
; db_log (Path)
; Name of a logfile to log slow database queries.
db_log =
; db_log_index (Path)
; Name of a logfile to log queries with bad indexes.
db_log_index =
; db_log_index_watch (Comma-separated list)
; Watchlist of indexes to watch.
db_log_index_watch =
; db_log_index_blacklist (Comma-separated list)
; Blacklist of indexes that shouldn't be watched.
db_log_index_blacklist =
; db_loglimit (Integer)
; If a database call lasts longer than this value in seconds it is logged.
; Inactive if system.db_log is empty.
db_loglimit = 10
; db_loglimit_index (Integer)
; Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
db_loglimit_index = 0
; db_loglimit_index_high (Integer)
; Number of index rows to be logged anyway (for any index). 0 to disable.
db_loglimit_index_high = 0
; dbclean_expire_conversation (Integer)
; When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
: This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
dbclean_expire_conversation = 90
; dbclean-expire-limit (Integer)
; This defines the number of items that are to be deleted in a single call.
; Reduce this value when you are getting memory issues.
dbclean-expire-limit = 1000
; diaspora_test (Boolean)
; For development only. Disables the message transfer.
diaspora_test = false
; disable_email_validation (Boolean)
; Disables the check if a mail address is in a valid format and can be resolved via DNS.
disable_email_validation = false
; disable_url_validation (Boolean)
; Disables the DNS lookup of an URL.
disable_url_validation = false
; disable_password_exposed (Boolean)
; Disable the exposition check against the remote haveibeenpwned API on password change.
disable_password_exposed = false
; disable_polling (Boolean)
; Disable the polling of DFRN and OStatus contacts through onepoll.php.
disable_polling = false
; dlogfile (Path)
; location of the developer log file.
dlogfile =
; dlogip (String)
; restricts develop log writes to requests originating from this IP address.
dlogip =
; free_crawls (Integer)
; Number of "free" searches when system.permit_crawling is activated.
free_crawls = 10
; frontend_worker_timeout (Integer)
; Value in minutes after we think that a frontend task was killed by the webserver.
frontend_worker_timeout = 10
; groupedit_image_limit (Integer)
; Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.
; This can alternatively be set on a per account basis in the pconfig table.
groupedit_image_limit = 400
; hsts (Boolean)
; Enables the sending of HTTP Strict Transport Security headers.
hsts = false
; ignore_cache (Boolean)
; For development only. Disables the item cache.
ignore_cache = false
; instances_social_key (String)
; Key to the API of https://instances.social which retrieves data about mastodon servers.
; See https://instances.social/api/token to get an API key.
instances_social_key =
; ipv4_resolve (Boolean)
; Resolve IPV4 addresses only. Don't resolve to IPV6.
ipv4_resolve = false
; invitation_only (Boolean)
; If set true registration is only possible after a current member of the node has send an invitation.
invitation_only = false
; like_no_comment (Boolean)
; Don't update the "commented" value of an item when it is liked.
like_no_comment = false
; local_block (Boolean)
; Used in conjunction with "block_public".
local_block = false
; local_search (Boolean)
; Blocks search for users who are not logged in to prevent crawlers from blocking your system.
local_search = false
; local_tags (Boolean)
; If activated, all hashtags will point to the local server.
local_tags = false
; max_batch_queue (Integer)
; Maximum number of batched queue items for a single contact before subsequent messages are discarded.
max_batch_queue = 1000
; max_connections (Integer)
; The maximum number of database connections which can be in use before the worker process is deferred to its next interval.
; When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.
max_connections = 0
; max_connections_level (Integer 0-100)
; The maximum percentage of connections that are allowed to let the worker start.
max_connections_level = 75
; max_contact_queue (Integer)
; Maximum number of queue items for a single contact before subsequent messages are discarded.
max_contact_queue = 500
; max_image_length (Integer)
; An alternate way of limiting picture upload sizes.
; Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
; Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
; If you don't want to set a maximum length, set to -1.
max_image_length = -1
; max_processes_backend (Integer)
; Maximum number of concurrent database processes for background tasks.
max_processes_backend = 5
; max_processes_frontend (Integer)
; Maximum number of concurrent database processes for foreground tasks.
max_processes_frontend = 20
; maximagesize (Integer)
; Maximum size in bytes of an uploaded photo.
maximagesize = 800000
; memcache_host (String)
; Host name of the memcache daemon.
memcache_host = 127.0.0.1
; memcache_port (Integer)
; Port number of the memcache daemon.
memcache_port = 11211
; memcached_hosts (Array)
; Array of Memcached servers info "host, port(, weight)".
memcached_hosts[0] = 127.0.0.1,11211
; min_poll_interval (Integer)
; minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.
min_poll_interval = 1
; no_count (Boolean)
; Don't do count calculations (currently only when showing albums).
no_count = false
; no_oembed (Boolean)
; Don't use OEmbed to fetch more information about a link.
no_oembed = false
; no_smilies (Boolean)
; Don't show smilies.
no_smilies = false
; no_view_full_size (Boolean)
; Don't add the link "View full size" under a resized image.
no_view_full_size = false
; optimize_items (Boolean)
; Triggers an SQL command to optimize the item table before expiring items.
optimize_items = false
; paranoia (Boolean)
; Log out users if their IP address changed.
paranoia = false
; permit_crawling (Boolean)
; Restricts the search for not logged in users to one search per minute.
permit_crawling = false
; pidfile (Path)
; Daemon pid file path. For example: pidfile = /path/to/daemon.pid
pidfile =
; png_quality (Integer)
; Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
png_quality = 8
; profiler (Boolean)
; Enable internal timings to help optimize code. Needed for "rendertime" addon.
profiler = false
; proxy_cache_time (Integer)
; Period in seconds after which the cache is cleared.
proxy_cache_time = 86400
; pushpoll_frequency (Integer)
; Frequency of contact poll for subhub contact using the DFRM or OStatus network.
; Available values:
; - 5 = every month
; - 4 = every week
; - 3 = every day
; - 2 = twice a day
; - 1 = every hour
; - 0 = every minute
pushpoll_frequency = 3
; queue_no_dead_check (Boolean)
; Ignore if the target contact or server seems to be dead during queue delivery.
queue_no_dead_check = false
; redis_host (String)
; Host name of the redis daemon.
redis_host = 127.0.0.1
; redis_port (String)
; Port number of the redis daemon.
redis_port = 6379
; session_handler (database|cache|native)
; Whether to use Cache to store session data or to use PHP native session storage.
session_handler = database
; remove_multiplicated_lines (Boolean)
; If enabled, multiple linefeeds in items are stripped to a single one.
remove_multiplicated_lines = false
; sendmail_params (Boolean)
; Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
; This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
; Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
sendmail_params = true
; show_global_community_hint (Boolean)
; When the global community page is enabled, use this option to display a hint above the stream, that this is a collection of all public top-level postings that arrive on your node.
show_global_community_hint = false
; show_unsupported_addons (Boolean)
; Show all addons including the unsupported ones.
show_unsupported_addons = false
; show_unsupported_themes (Boolean)
; Show all themes including the unsupported ones.
show_unsupported_themes = false
; throttle_limit_day (Integer)
; Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
throttle_limit_day = 0
; throttle_limit_week (Integer)
; Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
throttle_limit_week = 0
; throttle_limit_month (Integer)
; Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
throttle_limit_month = 0
; urlpath (String)
; If you are using a subdirectory of your domain you will need to put the relative path (from the root of your domain) here.
; For instance if your URL is 'http://example.com/directory/subdirectory', set urlpath to 'directory/subdirectory'.
urlpath =
; username_min_length (Integer)
; The minimum character length a username can be.
; This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
; Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
username_min_length = 3
; username_max_length (Integer)
; The maximum character length a username can be.
; This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
; Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
username_max_length = 48
; worker_cooldown (Integer)
; Cooldown period in seconds after each worker function call.
worker_cooldown = 0
; worker_debug (Boolean)
; If enabled, it prints out the number of running processes split by priority.
worker_debug = false
; worker_fetch_limit (Integer)
; Number of worker tasks that are fetched in a single query.
worker_fetch_limit = 1
; worker_load_exponent (Integer)
; Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
; For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
; Setting 0 would allow maximum worker queues at all times, which is not recommended.
worker_load_exponent = 3
; xrd_timeout (Integer)
; Timeout in seconds for fetching the XRD links.
xrd_timeout = 20
[experimental]
; exp_themes (Boolean)
; Show experimental themes in user settings.
exp_themes = false
[theme]
; hide_eventlist (Boolean)
; Don't show the birthdays and events on the profile and network page.
hide_eventlist = false
[jabber]
; debug (Boolean)
; Enable debug level for the jabber account synchronisation.
debug = false
; lockpath (Path)
; Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
lockpath =
INI;
// Keep this line

424
config/defaults.config.php Normal file
View file

@ -0,0 +1,424 @@
<?php
// CONFIG.PHP
/* This file declares the default values for the base config of Friendica.
*
* These configuration values aren't accessible from the admin settings page and custom values must be set in config/local.config.php
*
* Please don't edit this file directly as its content may change in the upcoming versions.
*/
return [
'database' => [
// host (String)
// Hostname or IP address of the database server.
// Can contain the port number with the syntax "hostname:port".
'hostname' => '',
// user (String)
// Database user name. Please don't use "root".
'username' => '',
// pass (String)
// Database user password. Please don't use empty passwords.
'password' => '',
// base (String)
// Database name.
'database' => '',
// charset (String)
// Database connexion charset. Changing this value will likely corrupt special characters.
'charset' => 'utf8mb4',
],
'config' => [
// admin_email (Comma-separated list)
// In order to perform system administration via the admin panel,
// this must precisely match the email address of the person logged in.
'admin_email' => '',
// admin_nickname (String)
// Nickname of the main admin user, used if there are more than one admin user defined in config => admin_email.
'admin_nickname' => '',
// max_import_size (Integer)
// Maximum body size of DFRN and Mail messages in characters. 0 is unlimited.
'max_import_size' => 200000,
// php_path (String)
// Location of PHP command line processor.
'php_path' => 'php',
],
'system' => [
// allowed_link_protocols (Array)
// Allowed protocols in links URLs, add at your own risk. http is always allowed.
'allowed_link_protocols' => ['ftp', 'ftps', 'mailto', 'cid', 'gopher'],
// always_show_preview (Boolean)
// Only show small preview pictures.
'always_show_preview' => false,
// archival_days (Integer)
// Number of days that we try to deliver content before we archive a contact.
'archival_days' => 32,
// auth_cookie_lifetime (Integer)
// Number of days that should pass without any activity before a user who
// chose "Remember me" when logging in is considered logged out.
'auth_cookie_lifetime' => 7,
// block_local_dir (Boolean)
// Deny public access to the local user directory.
'block_local_dir' => false,
// cache_driver (database|memcache|memcached|redis)
// Whether to use Memcache or Memcached or Redis to store temporary cache.
'cache_driver' => 'database',
// config_adapter (jit|preload)
// Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
'config_adapter' => 'jit',
// curl_range_bytes (Integer)
// Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
'curl_range_bytes' => 0,
// crawl_permit_period (Integer)
// Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
'crawl_permit_period' => 60,
// db_log (Path)
// Name of a logfile to log slow database queries.
'db_log' => '',
// db_log_index (Path)
// Name of a logfile to log queries with bad indexes.
'db_log_index' => '',
// db_log_index_watch (Comma-separated list)
// Watchlist of indexes to watch.
'db_log_index_watch' => '',
// db_log_index_blacklist (Comma-separated list)
// Blacklist of indexes that shouldn't be watched.
'db_log_index_blacklist' => '',
// db_loglimit (Integer)
// If a database call lasts longer than this value in seconds it is logged.
// Inactive if system => db_log is empty.
'db_loglimit' => 10,
// db_loglimit_index (Integer)
// Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
'db_loglimit_index' => 0,
// db_loglimit_index_high (Integer)
// Number of index rows to be logged anyway (for any index). 0 to disable.
'db_loglimit_index_high' => 0,
// dbclean_expire_conversation (Integer)
// When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
// This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
'dbclean_expire_conversation' => 90,
// dbclean-expire-limit (Integer)
// This defines the number of items that are to be deleted in a single call.
// Reduce this value when you are getting memory issues.
'dbclean-expire-limit' => 1000,
// diaspora_test (Boolean)
// For development only. Disables the message transfer.
'diaspora_test' => false,
// disable_email_validation (Boolean)
// Disables the check if a mail address is in a valid format and can be resolved via DNS.
'disable_email_validation' => false,
// disable_url_validation (Boolean)
// Disables the DNS lookup of an URL.
'disable_url_validation' => false,
// disable_password_exposed (Boolean)
// Disable the exposition check against the remote haveibeenpwned API on password change.
'disable_password_exposed' => false,
// disable_polling (Boolean)
// Disable the polling of DFRN and OStatus contacts through onepoll.php.
'disable_polling' => false,
// dlogfile (Path)
// location of the developer log file.
'dlogfile' => '',
// dlogip (String)
// restricts develop log writes to requests originating from this IP address.
'dlogip' => '',
// free_crawls (Integer)
// Number of "free" searches when system => permit_crawling is enabled.
'free_crawls' => 10,
// frontend_worker_timeout (Integer)
// Value in minutes after we think that a frontend task was killed by the webserver.
'frontend_worker_timeout' => 10,
// groupedit_image_limit (Integer)
// Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.
// This can alternatively be set on a per account basis in the pconfig table.
'groupedit_image_limit' => 400,
// hsts (Boolean)
// Enables the sending of HTTP Strict Transport Security headers.
'hsts' => false,
// ignore_cache (Boolean)
// For development only. Disables the item cache.
'ignore_cache' => false,
// instances_social_key (String)
// Key to the API of https://instances.social which retrieves data about mastodon servers.
// See https://instances.social/api/token to get an API key.
'instances_social_key' => '',
// ipv4_resolve (Boolean)
// Resolve IPV4 addresses only. Don't resolve to IPV6.
'ipv4_resolve' => false,
// invitation_only (Boolean)
// If set true registration is only possible after a current member of the node has send an invitation.
'invitation_only' => false,
// like_no_comment (Boolean)
// Don't update the "commented" value of an item when it is liked.
'like_no_comment' => false,
// local_block (Boolean)
// Used in conjunction with "block_public".
'local_block' => false,
// local_search (Boolean)
// Blocks search for users who are not logged in to prevent crawlers from blocking your system.
'local_search' => false,
// local_tags (Boolean)
// If activated, all hashtags will point to the local server.
'local_tags' => false,
// max_batch_queue (Integer)
// Maximum number of batched queue items for a single contact before subsequent messages are discarded.
'max_batch_queue' => 1000,
// max_connections (Integer)
// The maximum number of database connections which can be in use before the worker process is deferred to its next interval.
// When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.
'max_connections' => 0,
// max_connections_level (Integer 0-100)
// The maximum percentage of connections that are allowed to let the worker start.
'max_connections_level' => 75,
// max_contact_queue (Integer)
// Maximum number of queue items for a single contact before subsequent messages are discarded.
'max_contact_queue' => 500,
// max_image_length (Integer)
// An alternate way of limiting picture upload sizes.
// Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
// Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
// If you don't want to set a maximum length, set to -1.
'max_image_length' => -1,
// max_processes_backend (Integer)
// Maximum number of concurrent database processes for background tasks.
'max_processes_backend' => 5,
// max_processes_frontend (Integer)
// Maximum number of concurrent database processes for foreground tasks.
'max_processes_frontend' => 20,
// maximagesize (Integer)
// Maximum size in bytes of an uploaded photo.
'maximagesize' => 800000,
// memcache_host (String)
// Host name of the memcache daemon.
'memcache_host' => '127.0.0.1',
// memcache_port (Integer)
// Port number of the memcache daemon.
'memcache_port' => 11211,
// memcached_hosts (Array)
// Array of Memcached servers info [host, port(, weight)], see Memcached::addServers.
'memcached_hosts' => [
['127.0.0.1', '11211'],
],
// min_poll_interval (Integer)
// minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.
'min_poll_interval' => 1,
// no_count (Boolean)
// Don't do count calculations (currently only when showing photo albums).
'no_count' => false,
// no_oembed (Boolean)
// Don't use OEmbed to fetch more information about a link.
'no_oembed' => false,
// no_smilies (Boolean)
// Don't show smilies.
'no_smilies' => false,
// no_view_full_size (Boolean)
// Don't add the link "View full size" under a resized image.
'no_view_full_size' => false,
// optimize_items (Boolean)
// Triggers an SQL command to optimize the item table before expiring items.
'optimize_items' => false,
// paranoia (Boolean)
// Log out users if their IP address changed.
'paranoia' => false,
// permit_crawling (Boolean)
// Restricts the search for not logged in users to one search per minute.
'permit_crawling' => false,
// pidfile (Path)
// Daemon pid file path. For example: pidfile = /path/to/daemon.pid
'pidfile' => '',
// png_quality (Integer)
// Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
'png_quality' => 8,
// profiler (Boolean)
// Enable internal timings to help optimize code. Needed for "rendertime" addon.
'profiler' => false,
// proxy_cache_time (Integer)
// Period in seconds after which the cache is cleared.
'proxy_cache_time' => 86400,
// pushpoll_frequency (Integer)
// Frequency of contact poll for subhub contact using the DFRM or OStatus network.
// Available values:
// - 5 = every month
// - 4 = every week
// - 3 = every day
// - 2 = twice a day
// - 1 = every hour
// - 0 = every minute
'pushpoll_frequency' => 3,
// queue_no_dead_check (Boolean)
// Ignore if the target contact or server seems to be dead during queue delivery.
'queue_no_dead_check' => false,
// redis_host (String)
// Host name of the redis daemon.
'redis_host' => '127.0.0.1',
// redis_port (String)
// Port number of the redis daemon.
'redis_port' => 6379,
// session_handler (database|cache|native)
// Whether to use Cache to store session data or to use PHP native session storage.
'session_handler' => 'database',
// remove_multiplicated_lines (Boolean)
// If enabled, multiple linefeeds in items are stripped to a single one.
'remove_multiplicated_lines' => false,
// sendmail_params (Boolean)
// Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
// This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
// Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
'sendmail_params' => true,
// show_global_community_hint (Boolean)
// When the global community page is enabled, use this option to display a hint above the stream, that this is a collection of all public top-level postings that arrive on your node.
'show_global_community_hint' => false,
// show_unsupported_addons (Boolean)
// Show all addons including the unsupported ones.
'show_unsupported_addons' => false,
// show_unsupported_themes (Boolean)
// Show all themes including the unsupported ones.
'show_unsupported_themes' => false,
// throttle_limit_day (Integer)
// Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
'throttle_limit_day' => 0,
// throttle_limit_week (Integer)
// Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
'throttle_limit_week' => 0,
// throttle_limit_month (Integer)
// Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
'throttle_limit_month' => 0,
// urlpath (String)
// If you are using a subdirectory of your domain you will need to put the relative path (from the root of your domain) here.
// For instance if your URL is 'http://example.com/directory/subdirectory', set urlpath to 'directory/subdirectory'.
'urlpath' => '',
// username_min_length (Integer)
// The minimum character length a username can be.
// This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
// Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
'username_min_length' => 3,
// username_max_length (Integer)
// The maximum character length a username can be.
// This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
// Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
'username_max_length' => 48,
// worker_cooldown (Integer)
// Cooldown period in seconds after each worker function call.
'worker_cooldown' => 0,
// worker_debug (Boolean)
// If enabled, it prints out the number of running processes split by priority.
'worker_debug' => false,
// worker_fetch_limit (Integer)
// Number of worker tasks that are fetched in a single query.
'worker_fetch_limit' => 1,
// worker_load_exponent (Integer)
// Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
// For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
// Setting 0 would allow maximum worker queues at all times, which is not recommended.
'worker_load_exponent' => 3,
// xrd_timeout (Integer)
// Timeout in seconds for fetching the XRD links.
'xrd_timeout' => 20,
],
'experimental' => [
// exp_themes (Boolean)
// Show experimental themes in user settings.
'exp_themes' => false,
],
'theme' => [
// hide_eventlist (Boolean)
// Don't show the birthdays and events on the profile and network page.
'hide_eventlist' => false,
],
'jabber' => [
// debug (Boolean)
// Enable debug level for the jabber account synchronisation.
'debug' => false,
// lockpath (Path)
// Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
'lockpath' => '',
],
];

View file

@ -0,0 +1,44 @@
<?php
// Local configuration
/* If automatic system installation fails:
*
* Copy this file to local.config.php
*
* Why local.config.php? Because it contains sensitive information which could
* give somebody complete control of your database. Apache's default
* configuration will interpret any .php file as a script and won't show the values
*
* Then set the following for your MySQL installation
*
* If you're unsure about what any of the config keys below do, please check the config/defaults.config.php file for
* detailed documentation of their data type and behavior.
*/
return [
'database' => [
'hostname' => 'localhost',
'username' => 'mysqlusername',
'password' => 'mysqlpassword',
'database' => 'mysqldatabasename',
'charset' => 'utf8mb4',
],
// ****************************************************************
// The configuration below will be overruled by the admin panel.
// Changes made below will only have an effect if the database does
// not contain any configuration for the friendica system.
// ****************************************************************
'config' => [
'admin_email' => '',
'sitename' => 'Friendica Social Network',
'register_policy' => REGISTER_OPEN,
'register_text' => '',
],
'system' => [
'default_timezone' => 'UTC',
'language' => 'en',
],
];

View file

@ -1,41 +0,0 @@
<?php return <<<INI
; If automatic system installation fails:
; Copy this file to local.ini.php
; Why local.ini.php? Because it contains sensitive information which could
; give somebody complete control of your database. Apache's default
; configuration will interpret any .php file as a script and won't show the values
; Then set the following for your MySQL installation
[database]
hostname = localhost
username = mysqlusername
password = mysqlpassword
database = mysqldatabasename
charset = utf8mb4
; ****************************************************************
; The configuration below will be overruled by the admin panel.
; Changes made below will only have an effect if the database does
; not contain any configuration for the friendica system.
; ****************************************************************
[config]
admin_email =
sitename = Friendica Social Network
register_policy = REGISTER_OPEN
register_text =
[system]
default_timezone = UTC
language = en
INI;
// Keep this line

113
config/settings.config.php Normal file
View file

@ -0,0 +1,113 @@
<?php
// SETTINGS.PHP
/* This file declares the default values for the admin settings of Friendica.
*
* These values will be overridden by the admin settings page.
*
* Please don't edit this file directly as its content may change in the upcoming versions.
*/
return [
'config' => [
// info (String)
// Plaintext description of this node, used in the /friendica module.
'info' => '',
// register_policy (Constant)
// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
// Be certain to create your own personal account before setting REGISTER_CLOSED.
// REGISTER_APPROVE requires you set system.admin_email to the email address of an already registered person who can authorize and/or approve/deny the request.
'register_policy' => REGISTER_CLOSED,
// register_text (String)
// Will be displayed prominently on the registration page.
'register_text' => '',
// sitename (String)
// Displayed server name.
'sitename' => 'Friendica Social Network',
],
'system' => [
// account_abandon_days (Integer)
// Will not waste system resources polling external sites for abandonded accounts.
// Enter 0 for no time limit.
'account_abandon_days' => 0,
// addon (Comma-separated list)
// Manual list of addons which are enabled on this system.
'addon' => '',
// allowed_themes (Comma-separated list)
// Themes users can change to in their settings.
'allowed_themes' => 'quattro,vier,duepuntozero,smoothly',
// default_timezone (String)
// Choose a default timezone. See https://secure.php.net/manual/en/timezones.php
// It only applies to timestamps for anonymous viewers.
'default_timezone' => 'UTC',
// directory (String)
// URL of the global directory.
'directory' => 'https://dir.friendica.social',
// forbidden_nicknames (Comma-separated list)
// Prevents users from registering the specified nicknames on this node.
// Default value comprises classic role names from RFC 2142.
'forbidden_nicknames' => 'info, marketing, sales, support, abuse, noc, security, postmaster, hostmaster, usenet, news, webmaster, www, uucp, ftp, root, sysop',
// jpeg_quality (Integer)
// Sets the ImageMagick quality level for JPEG images. Values ranges from 50 (awful) to 100 (near perfect).
'jpeg_quality' => 100,
// language (String)
// System default languague, inluding admin-created user default language.
// Two-letters ISO 639-1 code.
'language' => 'en',
// max_image_length (Integer)
// An alternate way of limiting picture upload sizes.
// Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
// Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
// If you don't want to set a maximum length, set to -1.
'max_image_length' => -1,
// maximagesize (Integer)
// Maximum size in bytes of an uploaded photo.
'maximagesize' => 800000,
// no_regfullname (Boolean)
// Allow pseudonyms (true) or enforce a space between first name and last name in Full name, as an anti spam measure (false).
'no_regfullname' => true,
// optimize_max_tablesize (Integer)
// Maximum table size (in MB) for the automatic optimization.
// -1 to disable automatic optimization.
// 0 to use internal default (100MB)
'optimize_max_tablesize' => -1,
// rino_encrypt (Integer)
// Server-to-server private message encryption (RINO).
// Encryption will only be provided if this setting is set to a non zero value on both servers.
// Set to 0 to disable, 2 to enable, 1 is deprecated but won't need mcrypt.
'rino_encrypt' => 2,
// temppath (String)
// Custom temporary file directory
'temppath' => '',
// theme (String)
// System theme name.
'theme' => 'vier',
// url (String)
// The fully-qualified URL of this Friendica node.
// Used by the worker in a non-HTTP execution environment.
'url' => '',
],
// Used in the admin settings to lock certain features
'featurelock' => [
],
];

View file

@ -1,112 +0,0 @@
<?php return <<<INI
; SETTINGS.INI.PHP
; This file declares the default values for the admin settings of Friendica.
; These values will be overriden by the admin settings page.
; Please don't edit this file directly as its content may change in the upcoming versions.
[config]
; info (String)
; Plaintext description of this node, used in the /friendica module.
info =
; register_policy (Constant)
; Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
; Be certain to create your own personal account before setting REGISTER_CLOSED.
; REGISTER_APPROVE requires you set system.admin_email to the email address of an already registered person who can authorize and/or approve/deny the request.
register_policy = REGISTER_CLOSED
; register_text (String)
; Will be displayed prominently on the registration page.
register_text = ''
; sitename (String)
; Displayed server name.
sitename = "Friendica Social Network"
[system]
; account_abandon_days (Integer)
; Will not waste system resources polling external sites for abandonded accounts.
; Enter 0 for no time limit.
account_abandon_days = 0
; addon (Comma-separated list)
; Manual list of addons which are enabled on this system.
addon =
; allowed_themes (Comma-separated list)
; Themes users can change to in their settings.
allowed_themes = 'quattro,vier,duepuntozero,smoothly'
; default_timezone (String)
; Choose a default timezone. See https://secure.php.net/manual/en/timezones.php
; It only applies to timestamps for anonymous viewers.
default_timezone = UTC
; directory (String)
; URL of the global directory.
directory = https://dir.friendica.social
; forbidden_nicknames (Comma-separated list)
; Prevents users from registering the specified nicknames on this node.
; Default value comprises classic role names from RFC 2142.
forbidden_nicknames = info, marketing, sales, support, abuse, noc, security, postmaster, hostmaster, usenet, news, webmaster, www, uucp, ftp, root, sysop
; jpeg_quality (Integer)
; Sets the ImageMagick quality level for JPEG images. Values ranges from 50 (awful) to 100 (near perfect).
jpeg_quality = 100
; language (String)
; System default languague, inluding admin-created user default language.
; Two-letters ISO 639-1 code.
language = en
; max_image_length (Integer)
; An alternate way of limiting picture upload sizes.
; Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
; Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
; If you don't want to set a maximum length, set to -1.
max_image_length = -1
; maximagesize (Integer)
; Maximum size in bytes of an uploaded photo.
maximagesize = 800000
; no_regfullname (Boolean)
; Allow pseudonyms (true) or enforce a space between firstname and lastname in Full name, as an antispam measure (false).
no_regfullname = true
; optimize_max_tablesize (Integer)
; Maximum table size (in MB) for the automatic optimization.
; -1 to disable automatic optimization.
; 0 to use internal default (100MB)
optimize_max_tablesize = -1
; rino_encrypt (Integer)
; Server-to-server private message encryption (RINO).
; Encryption will only be provided if this setting is set to a non zero value on both servers.
; Set to 0 to disable, 2 to enable, 1 is deprecated but wont need mcrypt.
rino_encrypt = 2
; temppath (String)
; Custom temporary file directory
temppath =
; theme (String)
; System theme name.
theme = vier
; url (String)
; The fully-qualified URL of this Friendica node.
; Used by the worker in a non-HTTP execution environment.
url =
; Used in the admin settings to lock certain features
[featurelock]
INI;
// Keep this line

View file

@ -1,55 +1,54 @@
Config values that can only be set in config/local.ini.php Config values that can only be set in config/local.config.php
========================================================== ==========================================================
* [Home](help) * [Home](help)
Friendica's configuration is done in two places: in INI configuration files and in the `config` database table. Friendica's configuration is done in two places: in PHP array configuration files and in the `config` database table.
Database config values overwrite the same file config values. Database config values overwrite the same file config values.
## File configuration ## File configuration
WARNING: some characters `?{}|&~![()^"` should not be used in the keys or values. If one of those character is required put the value between double quotes (eg. password = "let&me&in") The configuration format for file configuration is an array returned from a PHP file.
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.
This prevents your webserver from displaying your private configuration it interprets the configuration files and displays nothing.
A typical configuration file looks like this: A typical configuration file looks like this:
```php ```php
<?php return <<<INI <?php
; Comment line /*
* Comment block
*/
[section1] return [
key = value 'section1' => [
empty_key = // Comment line
'key' => 'value',
[section2] ],
array[] = value0 'section2' => [
array[] = value1 'array' => ['value0', 'value1', 'value2'],
array[] = value2 ],
];
INI;
// Keep this line
``` ```
### Configuration location ### Configuration location
The `config` directory holds key configuration files: The `config` directory holds key configuration files:
- `config.ini.php` holds the default values for all the configuration keys that can only be set in `local.ini.php`. - `defaults.config.php` holds the default values for all the configuration keys that can only be set in `local.config.php`.
- `settings.ini.php` holds the default values for some configuration keys that are set through the admin settings page. - `settings.config.php` holds the default values for some configuration keys that are set through the admin settings page.
- `local.ini.php` holds the current node custom configuration. - `local.config.php` holds the current node custom configuration.
- `addon.ini.php` is optional and holds the custom configuration for specific addons. - `addon.config.php` is optional and holds the custom configuration for specific addons.
Addons can define their own default configuration values in `addon/[addon]/config/[addon].ini.php` which is loaded when the addon is activated. Addons can define their own default configuration values in `addon/[addon]/config/[addon].config.php` which is loaded when the addon is activated.
#### Migrating from .htconfig.php to config/local.ini.php #### Migrating from .htconfig.php to config/local.config.php
The legacy `.htconfig.php` configuration file is still supported, but is deprecated and will be removed in a subsequent Friendica release. The legacy `.htconfig.php` configuration file is still supported, but is deprecated and will be removed in a subsequent Friendica release.
The migration is pretty straightforward: The migration is pretty straightforward:
If you had any addon-specific configuration in your `.htconfig.php`, just copy `config/addon-sample.ini.php` to `config/addon.ini.php` and move your configuration values. If you had any addon-specific configuration in your `.htconfig.php`, just copy `config/addon-sample.config.php` to `config/addon.config.php` and move your configuration values.
Afterwards, copy `config/local-sample.ini.php` to `config/local.ini.php`, move the remaining configuration values to it according to the following conversion chart, then rename your `.htconfig.php` to check your node is working as expected before deleting it. Afterwards, copy `config/local-sample.config.php` to `config/local.config.php`, move the remaining configuration values to it according to the following conversion chart, then rename your `.htconfig.php` to check your node is working as expected before deleting it.
<style> <style>
table.config { table.config {
@ -81,7 +80,7 @@ table.config > * > tr > th {
<thead> <thead>
<tr> <tr>
<th>.htconfig.php</th> <th>.htconfig.php</th>
<th>config/local.ini.php</th> <th>config/local.config.php</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -94,25 +93,25 @@ $db_data = 'mysqldatabasename';
$a->config["system"]["db_charset"] = 'utf8mb4'; $a->config["system"]["db_charset"] = 'utf8mb4';
</pre></td> </pre></td>
<td><pre> <td><pre>
[database] 'database' => [
hostname = localhost 'hostname' => 'localhost',
username = mysqlusername 'username' => 'mysqlusername',
password = mysqlpassword 'password' => 'mysqlpassword',
database = mysqldatabasename 'database' => 'database',
charset = utf8mb4 'charset' => 'utf8mb4',
],
</pre></td> </pre></td>
</tr> </tr>
<tr> <tr>
<td><pre> <td><pre>
$a->config["section"]["key"] = "value"; $a->config["section"]["key"] = "value";
</pre></td> </pre></td>
<td><pre> <td><pre>
[section] 'section' => [
key = value 'key' => 'value',
],
</pre></td> </pre></td>
</tr> </tr>
<tr> <tr>
<td><pre> <td><pre>
$a->config["section"]["key"] = array( $a->config["section"]["key"] = array(
@ -122,74 +121,137 @@ $a->config["section"]["key"] = array(
); );
</pre></td> </pre></td>
<td><pre> <td><pre>
[section] 'section' => [
key[] = value1 'key' => ['value1', 'value2', 'value3'],
key[] = value2 ],
key[] = value3
</pre></td> </pre></td>
</tr> </tr>
<tr> <tr>
<td><pre> <td><pre>
$a->config["key"] = "value"; $a->config["key"] = "value";
</pre></td> </pre></td>
<td><pre> <td><pre>
[config] 'config' => [
key = value 'key' => 'value',
],
</pre></td> </pre></td>
</tr> </tr>
<tr> <tr>
<td><pre> <td><pre>
$a->path = "value"; $a->path = "value";
</pre></td> </pre></td>
<td><pre> <td><pre>
[system] 'system' => [
urlpath = value 'urlpath' => 'value',
],
</pre></td> </pre></td>
</tr> </tr>
<tr> <tr>
<td><pre> <td><pre>
$default_timezone = "value"; $default_timezone = "value";
</pre></td> </pre></td>
<td><pre> <td><pre>
[system] 'system' => [
default_timezone = value 'default_timezone' => 'value',
],
</pre></td> </pre></td>
</tr> </tr>
<tr> <tr>
<td><pre> <td><pre>
$pidfile = "value"; $pidfile = "value";
</pre></td> </pre></td>
<td><pre> <td><pre>
[system] 'system' => [
pidfile = value 'pidfile' => 'value',
],
</pre></td> </pre></td>
</tr> </tr>
<tr> <tr>
<td><pre> <td><pre>
$lang = "value"; $lang = "value";
</pre></td> </pre></td>
<td><pre> <td><pre>
[system] 'system' => [
language = value 'language' => 'value',
],
</pre></td> </pre></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
#### Migrating from config/local.ini.php to config/local.config.php
The legacy `config/local.ini.php` configuration file is still supported, but is deprecated and will be removed in a subsequent Friendica release.
The migration is pretty straightforward:
If you had any addon-specific configuration in your `config/addon.ini.php`, just copy `config/addon-sample.config.php` to `config/addon.config.php` and move your configuration values.
Afterwards, copy `config/local-sample.config.php` to `config/local.config.php`, move the remaining configuration values to it according to the following conversion chart, then rename your `config/local.ini.php` file to check your node is working as expected before deleting it.
<table class="config">
<thead>
<tr>
<th>config/local.ini.php</th>
<th>config/local.config.php</th>
</tr>
</thead>
<tbody>
<tr>
<td><pre>
[database]
hostname = localhost
username = mysqlusername
password = mysqlpassword
database = mysqldatabasename
charset = utf8mb4
</pre></td>
<td><pre>
'database' => [
'hostname' => 'localhost',
'username' => 'mysqlusername',
'password' => 'mysqlpassword',
'database' => 'database',
'charset' => 'utf8mb4',
],
</pre></td>
</tr>
<tr>
<td><pre>
[section]
key = value
</pre></td>
<td><pre>
'section' => [
'key' => 'value',
],
</pre></td>
</tr>
<tr>
<td><pre>
[section]
key[] = value1
key[] = value2
key[] = value3
</pre></td>
<td><pre>
'section' => [
'key' => ['value1', 'value2', 'value3'],
],
</pre></td>
</tr>
</tbody>
</table>
### Database Settings ### Database Settings
The configuration variables database.hostname, database.username, database.password, database.database and database.charset are holding your credentials for the database connection. The configuration variables database.hostname, database.username, database.password, database.database and database.charset are holding your credentials for the database connection.
If you need to specify a port to access the database, you can do so by appending ":portnumber" to the database.hostname variable. If you need to specify a port to access the database, you can do so by appending ":portnumber" to the database.hostname variable.
[database] 'database' => [
hostname = your.mysqlhost.com:123456 'hostname' => 'your.mysqlhost.com:123456',
...
]
If all of the following environment variables are set, Friendica will use them instead of the previously configured variables for the db: If all of the following environment variables are set, Friendica will use them instead of the previously configured variables for the db:
@ -199,7 +261,7 @@ If all of the following environment variables are set, Friendica will use them i
MYSQL_PASSWORD MYSQL_PASSWORD
MYSQL_DATABASE MYSQL_DATABASE
## Config values that can only be set in config/local.ini.php ## Config values that can only be set in config/local.config.php
There are some config values that haven't found their way into the administration page. There are some config values that haven't found their way into the administration page.
This has several reasons. This has several reasons.
@ -210,22 +272,26 @@ Or it is for testing purposes only.
**Attention:** Please be warned that you shouldn't use one of these values without the knowledge what it could trigger. **Attention:** Please be warned that you shouldn't use one of these values without the knowledge what it could trigger.
Especially don't do that with undocumented values. Especially don't do that with undocumented values.
These configurations keys and their default value are listed in `config/config.ini.php` and should be ovewritten in `config/local.ini.php`. These configurations keys and their default value are listed in `config/defaults.config.php` and should be overwritten in `config/local.config.php`.
## Administrator Options ## Administrator Options
Enabling the admin panel for an account, and thus making the account holder admin of the node, is done by setting the variable Enabling the admin panel for an account, and thus making the account holder admin of the node, is done by setting the variable
[config] 'config' => [
admin_email = someone@example.com 'admin_email' => 'someone@example.com',
]
Where you have to match the email address used for the account with the one you enter to the config/local.ini.php file.
Where you have to match the email address used for the account with the one you enter to the `config/local.config.php` file.
If more then one account should be able to access the admin panel, separate the email addresses with a comma. If more then one account should be able to access the admin panel, separate the email addresses with a comma.
[config] 'config' => [
admin_email = someone@example.com,someoneelse@example.com 'admin_email' => 'someone@example.com,someoneelse@example.com',
]
If you want to have a more personalized closing line for the notification emails you can set a variable for the admin_name. If you want to have a more personalized closing line for the notification emails you can set a variable for the `admin_name`.
[config] 'config' => [
admin_name = Marvin 'admin_name' => 'Marvin',
]

View file

@ -64,7 +64,7 @@ However, instead of a direct upload you have to use one of the following methods
Friendica uses HTML5 for embedding content. Friendica uses HTML5 for embedding content.
Therefore, the supported files are dependent on your browser and operating system. Therefore, the supported files are dependent on your browser and operating system.
Some supported filetypes are WebM, MP4, MP3 and OGG. Some supported file types are WebM, MP4, MP3 and OGG.
See Wikipedia for more of them ([video](http://en.wikipedia.org/wiki/HTML5_video), [audio](http://en.wikipedia.org/wiki/HTML5_audio)). See Wikipedia for more of them ([video](http://en.wikipedia.org/wiki/HTML5_video), [audio](http://en.wikipedia.org/wiki/HTML5_audio)).
<a name="avatars"></a> <a name="avatars"></a>
@ -140,7 +140,7 @@ Example: Friendica Support
<a name="clients"></a> <a name="clients"></a>
### Are there any clients for friendica I can use? ### Are there any clients for friendica I can use?
Friendica is using a [Twitter/GNU Social compatible API](help/api), which means you can use any Twitter/GNU Social client for your plattform as long as you can change the API path in its settings. Friendica is using a [Twitter/GNU Social compatible API](help/api), which means you can use any Twitter/GNU Social client for your platform as long as you can change the API path in its settings.
Here is a list of known working clients: Here is a list of known working clients:
* Android * Android
@ -187,7 +187,7 @@ No, this function is no longer supported as of Friendica 3.3 onwards.
<a name="sources"></a> <a name="sources"></a>
### Where can I find the source code of friendica, addons and themes? ### Where can I find the source code of friendica, addons and themes?
You can find the main respository [here](https://github.com/friendica/friendica). You can find the main repository [here](https://github.com/friendica/friendica).
There you will always find the current stable version of friendica. There you will always find the current stable version of friendica.
Addons are listed at [this page](https://github.com/friendica/friendica-addons). Addons are listed at [this page](https://github.com/friendica/friendica-addons).
@ -197,14 +197,14 @@ If you are searching for new themes, you can find them at [Friendica-Themes.com]
<a name="adminaccount1"></a> <a name="adminaccount1"></a>
### I've changed my email address now the admin panel is gone? ### I've changed my email address now the admin panel is gone?
Have a look into your <tt>config/local.ini.php</tt> and fix your email address there. Have a look into your <tt>config/local.config.php</tt> and fix your email address there.
<a name="adminaccount2"></a> <a name="adminaccount2"></a>
### Can there be more then one admin for a node? ### Can there be more then one admin for a node?
Yes. Yes.
You just have to list more then one email address in the You just have to list more then one email address in the
<tt>config/local.ini.php</tt> file. <tt>config/local.config.php</tt> file.
The listed emails need to be separated by a comma. The listed emails need to be separated by a comma.
<a name="dbupdate"> <a name="dbupdate">

View file

@ -32,7 +32,7 @@ Friendica Documentation and Resources
* [Installing Connectors (Twitter/GNU Social)](help/Installing-Connectors) * [Installing Connectors (Twitter/GNU Social)](help/Installing-Connectors)
* [Install an ejabberd server (XMPP chat) with synchronized credentials](help/install-ejabberd) * [Install an ejabberd server (XMPP chat) with synchronized credentials](help/install-ejabberd)
* [Using SSL with Friendica](help/SSL) * [Using SSL with Friendica](help/SSL)
* [Config values that can only be set in config/local.ini.php](help/Config) * [Config values that can only be set in config/local.config.php](help/Config)
* [Improve Performance](help/Improve-Performance) * [Improve Performance](help/Improve-Performance)
* [Administration Tools](help/tools) * [Administration Tools](help/tools)
@ -56,7 +56,7 @@ Friendica Documentation and Resources
* [Twitter/GNU Social API Functions](help/api) * [Twitter/GNU Social API Functions](help/api)
* [Code (Doxygen generated - sets cookies)](doc/html/) * [Code (Doxygen generated - sets cookies)](doc/html/)
* [Protocol Documentation](help/Protocol) * [Protocol Documentation](help/Protocol)
* [Database schema documantation](help/database) * [Database schema documentation](help/database)
* [Class Autoloading](help/autoloader) * [Class Autoloading](help/autoloader)
**External Resources** **External Resources**

View file

@ -32,7 +32,7 @@ Requirements
* Curl, GD, PDO, MySQLi, hash, xml, zip and OpenSSL extensions * Curl, GD, PDO, MySQLi, hash, xml, zip and OpenSSL extensions
* The POSIX module of PHP needs to be activated (e.g. [RHEL, CentOS](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) have disabled it) * The POSIX module of PHP needs to be activated (e.g. [RHEL, CentOS](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) have disabled it)
* some form of email server or email gateway such that PHP mail() works * some form of email server or email gateway such that PHP mail() works
* Mysql 5.5.3+ or an equivalant alternative for MySQL (MariaDB, Percona Server etc.) * Mysql 5.5.3+ or an equivalent alternative for MySQL (MariaDB, Percona Server etc.)
* the ability to schedule jobs with cron (Linux/Mac) or Scheduled Tasks (Windows) (Note: other options are presented in Section 7 of this document.) * the ability to schedule jobs with cron (Linux/Mac) or Scheduled Tasks (Windows) (Note: other options are presented in Section 7 of this document.)
* Installation into a top-level domain or sub-domain (without a directory/path component in the URL) is preferred. Directory paths will not be as convenient to use and have not been thoroughly tested. * Installation into a top-level domain or sub-domain (without a directory/path component in the URL) is preferred. Directory paths will not be as convenient to use and have not been thoroughly tested.
* If your hosting provider doesn't allow Unix shell access, you might have trouble getting everything to work. * If your hosting provider doesn't allow Unix shell access, you might have trouble getting everything to work.
@ -75,7 +75,7 @@ Clone the addon repository (separately):
If you copy the directory tree to your webserver, make sure that you also copy .htaccess - as "dot" files are often hidden and aren't normally copied. If you copy the directory tree to your webserver, make sure that you also copy .htaccess - as "dot" files are often hidden and aren't normally copied.
If you want to use the development version of Friendica you can switch to the devel branch in the repository by running If you want to use the development version of Friendica you can switch to the develop branch in the repository by running
git checkout develop git checkout develop
bin/composer.phar install bin/composer.phar install
@ -108,19 +108,19 @@ If you need to specify a port for the connection to the database, you can do so
*If* the manual installation fails for any reason, check the following: *If* the manual installation fails for any reason, check the following:
* Does "config/local.ini.php" exist? If not, edit config/local-sample.ini.php and change the system settings. * Does "config/local.config.php" exist? If not, edit config/local-sample.config.php and change the system settings.
* Rename to `config/local.ini.php`. * Rename to `config/local.config.php`.
* Is the database is populated? If not, import the contents of `database.sql` with phpmyadmin or the mysql command line. * Is the database is populated? If not, import the contents of `database.sql` with phpmyadmin or the mysql command line.
At this point visit your website again, and register your personal account. At this point visit your website again, and register your personal account.
Registration errors should all be recoverable automatically. Registration errors should all be recoverable automatically.
If you get any *critical* failure at this point, it generally indicates the database was not installed correctly. If you get any *critical* failure at this point, it generally indicates the database was not installed correctly.
You might wish to move/rename `config/local.ini.php` to another name and empty (called 'dropping') the database tables, so that you can start fresh. You might wish to move/rename `config/local.config.php` to another name and empty (called 'dropping') the database tables, so that you can start fresh.
### Option B: Run the automatic install script ### Option B: Run the automatic install script
You have the following options to automatically install Friendica: You have the following options to automatically install Friendica:
- creating a prepared config file (f.e. `prepared.ini.php`) - creating a prepared config file (f.e. `prepared.config.php`)
- using environment variables (f.e. `MYSQL_HOST`) - using environment variables (f.e. `MYSQL_HOST`)
- using options (f.e. `--dbhost <host>`) - using options (f.e. `--dbhost <host>`)
@ -136,17 +136,17 @@ If you wish to include all optional checks, use `-a` like this statement:
*If* the automatic installation fails for any reason, check the following: *If* the automatic installation fails for any reason, check the following:
* Does `config/local.ini.php` already exist? If yes, the automatic installation won't start * Does `config/local.config.php` already exist? If yes, the automatic installation won't start
* Are the options in the `config/local.ini.php` correct? If not, edit them directly. * Are the options in the `config/local.config.php` correct? If not, edit them directly.
* Is the empty MySQL-database created? If not, create it. * Is the empty MySQL-database created? If not, create it.
#### B.1: Config file #### B.1: Config file
You can use a prepared config file like [local-sample.ini.php](config/local-sample.ini.php). You can use a prepared config file like [local-sample.config.php](config/local-sample.config.php).
Navigate to the main Friendica directory and execute the following command: Navigate to the main Friendica directory and execute the following command:
bin/console autoinstall -f <prepared.ini.php> bin/console autoinstall -f <prepared.config.php>
#### B.2: Environment variables #### B.2: Environment variables
@ -158,7 +158,7 @@ You can use the options during installation too and skip some of the environment
**Database credentials** **Database credentials**
if you don't use the option `--savedb` during installation, the DB credentials will **not** be saved in the `config/local.ini.php`. if you don't use the option `--savedb` during installation, the DB credentials will **not** be saved in the `config/local.config.php`.
- `MYSQL_HOST` The host of the mysql/mariadb database - `MYSQL_HOST` The host of the mysql/mariadb database
- `MYSQL_PORT` The port of the mysql/mariadb database - `MYSQL_PORT` The port of the mysql/mariadb database
@ -170,13 +170,13 @@ if you don't use the option `--savedb` during installation, the DB credentials w
**Friendica settings** **Friendica settings**
This variables wont be used at normal Friendica runtime. This variables wont be used at normal Friendica runtime.
Instead, they get saved into `config/local.ini.php`. Instead, they get saved into `config/local.config.php`.
- `FRIENDICA_URL_PATH` The URL path of Friendica (f.e. '/friendica') - `FRIENDICA_URL_PATH` The URL path of Friendica (f.e. '/friendica')
- `FRIENDICA_PHP_PATH` The path of the PHP binary - `FRIENDICA_PHP_PATH` The path of the PHP binary
- `FRIENDICA_ADMIN_MAIL` The admin email address of Friendica (this email will be used for admin access) - `FRIENDICA_ADMIN_MAIL` The admin email address of Friendica (this email will be used for admin access)
- `FRIENDICA_TZ` The timezone of Friendica - `FRIENDICA_TZ` The timezone of Friendica
- `FRIENDICA_LANG` The langauge of Friendica - `FRIENDICA_LANG` The language of Friendica
Navigate to the main Friendica directory and execute the following command: Navigate to the main Friendica directory and execute the following command:
@ -184,7 +184,7 @@ Navigate to the main Friendica directory and execute the following command:
#### B.3: Execution options #### B.3: Execution options
All options will be saved in the `config/local.ini.php` and are overruling the associated environment variables. All options will be saved in the `config/local.config.php` and are overruling the associated environment variables.
- `-H|--dbhost <host>` The host of the mysql/mariadb database (env `MYSQL_HOST`) - `-H|--dbhost <host>` The host of the mysql/mariadb database (env `MYSQL_HOST`)
- `-p|--dbport <port>` The port of the mysql/mariadb database (env `MYSQL_PORT`) - `-p|--dbport <port>` The port of the mysql/mariadb database (env `MYSQL_PORT`)
@ -256,5 +256,5 @@ Bad things will happen.
Let there be a hardware failure, a corrupted database or whatever you can think of. Let there be a hardware failure, a corrupted database or whatever you can think of.
So once the installation of your Friendica node is done, you should make yourself a backup plan. So once the installation of your Friendica node is done, you should make yourself a backup plan.
The most important file is the `config/local.ini.php` file. The most important file is the `config/local.config.php` file.
As it stores all your data, you should also have a recent dump of your Friendica database at hand, should you have to recover your node. As it stores all your data, you should also have a recent dump of your Friendica database at hand, should you have to recover your node.

View file

@ -19,7 +19,7 @@ Addons must be installed by the site administrator before they can be used.
This is accomplished through the site administration panel. This is accomplished through the site administration panel.
Each of the connectors also requires an "API key" from the service you wish to connect with. Each of the connectors also requires an "API key" from the service you wish to connect with.
Some addons allow you to enter this information in the site administration pages, while others may require you to edit your configuration file (config/local.ini.php). Some addons allow you to enter this information in the site administration pages, while others may require you to edit your configuration file (config/local.config.php).
The ways to obtain these keys vary between the services, but they all require an existing account on the target service. The ways to obtain these keys vary between the services, but they all require an existing account on the target service.
Once installed, these API keys can usually be shared by all site members. Once installed, these API keys can usually be shared by all site members.
@ -39,7 +39,7 @@ You can get it from [Twitter](https://twitter.com/apps).
Register your Friendica site as "Client" application with "Read & Write" access. Register your Friendica site as "Client" application with "Read & Write" access.
We do not need "Twitter as login". We do not need "Twitter as login".
When you've registered the app you get a key pair with an OAuth Consumer key and a secret key for your application/site. When you've registered the app you get a key pair with an OAuth Consumer key and a secret key for your application/site.
Add this key pair to your config/local.ini.php: Add this key pair to your config/local.config.php:
[twitter] [twitter]
consumerkey = your consumer_key here consumerkey = your consumer_key here

View file

@ -8,7 +8,7 @@ On the front page of the admin panel you will see a summary of information about
These information include the amount of messages currently being processed in the queues. These information include the amount of messages currently being processed in the queues.
The first number is the number of messages which could not been delivered for various reasons. The first number is the number of messages which could not been delivered for various reasons.
They will be resend later. They will be resend later.
You can have a quick glance into that second queus in the "Inspect Queue" section of the admin panel. You can have a quick glance into that second queues in the "Inspect Queue" section of the admin panel.
The second number represents the current number of jobs for the background workers. The second number represents the current number of jobs for the background workers.
These worker tasks are prioritised and are done accordingly. These worker tasks are prioritised and are done accordingly.
@ -16,9 +16,9 @@ Then you get an overview of the accounts on your node, which can be moderated in
As well as an overview of the currently active addons As well as an overview of the currently active addons
The list is linked, so you can have quick access to the Addon settings. The list is linked, so you can have quick access to the Addon settings.
And finally you are informed about the version of Friendica you have installed. And finally you are informed about the version of Friendica you have installed.
If you contact the devs with a bug or problem, please also mention the version of your node. If you contact the developers with a bug or problem, please also mention the version of your node.
The admin panel is seperated into subsections accessible from the side bar of the panel. The admin panel is separated into subsections accessible from the side bar of the panel.
## Site ## Site
@ -42,17 +42,17 @@ This option will set the default language for the node.
It is used as fall back setting should Friendica fail to recognize the visitors preferences and can be overwritten by user settings. It is used as fall back setting should Friendica fail to recognize the visitors preferences and can be overwritten by user settings.
The Friendica community offers some translations. The Friendica community offers some translations.
Some more compleate then others. Some more complete then others.
See [this help page](/help/translations) for more information about the translation process. See [this help page](/help/translations) for more information about the translation process.
#### System Theme #### System Theme
Choose a theme to be the default system theme. Choose a theme to be the default system theme.
This can be over-ridden by user profiles. This can be over-ridden by user profiles.
Default theme is "duepunto zero" at the moment. Default theme is `vier` at the moment.
You may also want to set a special theme for mobile interfaces. You may also want to set a special theme for mobile interfaces.
Which may or may not be neccessary depending of the mobile friendlyness of the desktop theme you have chosen. Which may or may not be necessary depending of the mobile friendliness of the desktop theme you have chosen.
The `vier` theme for instance is mobile friendly. The `vier` theme for instance is mobile friendly.
### Registration ### Registration
@ -68,8 +68,8 @@ You can chose between the following modes:
##### Invitation based registry ##### Invitation based registry
Additionally to the setting in the admin panel, you can devide if registrations are only possible using an invitation code or not. Additionally to the setting in the admin panel, you can decide if registrations are only possible using an invitation code or not.
To enable invitation based registration, you have to set the `invitation_only` setting in the [config/local.ini.php](/help/Config) file. To enable invitation based registration, you have to set the `invitation_only` setting in the [config/local.config.php](/help/Config) file.
If you want to use this method, the registration policy has to be set to either *open* or *requires approval*. If you want to use this method, the registration policy has to be set to either *open* or *requires approval*.
#### Check Full Names #### Check Full Names
@ -91,7 +91,7 @@ The ability to create "Pages" requires a person to register more than once.
Your site configuration can block registration (or require approval to register). Your site configuration can block registration (or require approval to register).
By default, logged in users can register additional accounts for use as pages. By default, logged in users can register additional accounts for use as pages.
These will still require approval if the registration policy is set to *require approval* These will still require approval if the registration policy is set to *require approval*
You may prohibit logged in users from creating additional accounts by setting *block multible registrations* to true. You may prohibit logged in users from creating additional accounts by setting *block multiple registrations* to true.
Default is false. Default is false.
### File upload ### File upload
@ -141,7 +141,7 @@ Wildcards are accepted.
(Wildcard support on Windows platforms requires PHP5.3). (Wildcard support on Windows platforms requires PHP5.3).
By default, any (valid) domain may establish friendships with this site. By default, any (valid) domain may establish friendships with this site.
This is useful if you want to setup a closed network for educational groups, cooperations and similar communities that don't want to commuicate with the rest of the network. This is useful if you want to setup a closed network for educational groups, cooperatives and similar communities that don't want to communicate with the rest of the network.
#### Allowed Email Domains #### Allowed Email Domains
@ -184,7 +184,7 @@ Value is in seconds.
Default is 60 seconds. Default is 60 seconds.
Set to 0 for unlimited (not recommended). Set to 0 for unlimited (not recommended).
#### Verify SSL Certitificates #### Verify SSL Certificates
By default Friendica allows SSL communication between websites that have "self-signed" SSL certificates. By default Friendica allows SSL communication between websites that have "self-signed" SSL certificates.
For the widest compatibility with browsers and other networks we do not recommend using self-signed certificates, but we will not prevent you from using them. For the widest compatibility with browsers and other networks we do not recommend using self-signed certificates, but we will not prevent you from using them.
@ -217,7 +217,7 @@ The tasks for the background process have priorities.
To guarantee that important tasks are executed even though the system has a lot of work to do, it is useful to enable the *fastlane*. To guarantee that important tasks are executed even though the system has a lot of work to do, it is useful to enable the *fastlane*.
Should you not be able to run a cron job on your server, you can also activate the *frontend* worker. Should you not be able to run a cron job on your server, you can also activate the *frontend* worker.
If you have done so, you can call `example.com/worker` (replace example.com with your actual domain name) on a regular basis from an external servie. If you have done so, you can call `example.com/worker` (replace example.com with your actual domain name) on a regular basis from an external service.
This will then trigger the execution of the background process. This will then trigger the execution of the background process.
### Relocate ### Relocate
@ -234,13 +234,13 @@ You can sort the user list by name, email, registration date, date of last login
Here the admin can also block/unblock users from accessing the node or delete the accounts entirely. Here the admin can also block/unblock users from accessing the node or delete the accounts entirely.
In the last section of the page admins can create new accounts on the node. In the last section of the page admins can create new accounts on the node.
The password for the new account will be send by email to the choosen email address. The password for the new account will be send by email to the chosen email address.
## Addons ## Addons
This page is for selecting and configuration of extensions for Friendica which have to be placed into the `/addon` subdirectory of your Friendica installation. This page is for selecting and configuration of extensions for Friendica which have to be placed into the `/addon` subdirectory of your Friendica installation.
You are presented with a long list of available addons. You are presented with a long list of available addons.
The name of each addon is linked to a separate page for that addon which offers more informations and configuration possibilities. The name of each addon is linked to a separate page for that addon which offers more information and configuration possibilities.
Also shown is the version of the addon and an indicator if the addon is currently active or not. Also shown is the version of the addon and an indicator if the addon is currently active or not.
When you update your node and the addons they may have to be reloaded. When you update your node and the addons they may have to be reloaded.
@ -263,16 +263,16 @@ In this section of the admin panel you can select a default setting for your nod
## DB Updates ## DB Updates
Should the database structure of Friendica change, it will apply the changes automatically. Should the database structure of Friendica change, it will apply the changes automatically.
In case you are suspecious that the update might not have worked, you can use this section of the admin panel to check the situation. In case you are suspecting the update might not have worked, you can use this section of the admin panel to check the situation.
## Inspect Queue ## Inspect Queue
In the admin panel summary there are two numbers for the message queues. In the admin panel summary there are two numbers for the message queues.
The second number represents messages which could not be delivered and are queued for later retry. The second number represents messages which could not be delivered and are queued for later retry.
If this number goes sky-rocking you might ask yourself which receopiant is not receiving. If this number goes sky-rocking you might ask yourself which recipient is not receiving.
Behind the inspect queue section of the admin panel you will find a list of the messages that could not be delivered. Behind the inspect queue section of the admin panel you will find a list of the messages that could not be delivered.
The listing is sorted by the receipiant name so identifying potential broken communication lines should be simple. The listing is sorted by the recipient name so identifying potential broken communication lines should be simple.
These lines might be broken for various reasons. These lines might be broken for various reasons.
The receiving end might be off-line, there might be a high system load and so on. The receiving end might be off-line, there might be a high system load and so on.
@ -288,7 +288,7 @@ Matching is exact, blocking a domain doesn't block subdomains.
## Federation Statistics ## Federation Statistics
The federation statistics page gives you a short summery of the nodes/servers/pods of the decentralized social network federation your node knows. The federation statistics page gives you a short summery of the nodes/servers/pods of the decentralized social network federation your node knows.
These numbers are not compleate and only contain nodes from networks Friendica federates directly with. These numbers are not complete and only contain nodes from networks Friendica federates directly with.
## Delete Item ## Delete Item
@ -304,16 +304,16 @@ All those addons will be listed in this area of the admin panels side bar with t
## Logs ## Logs
The log section of the admin panel is seperated into two pages. The log section of the admin panel is separated into two pages.
On the first, following the "log" link, you can configure how much Friendica shall log. On the first, following the "log" link, you can configure how much Friendica shall log.
And on the second you can read the log. And on the second you can read the log.
You should not place your logs into any directory that is accessible from the web. You should not place your logs into any directory that is accessible from the web.
If you have to, and you are using the default configuration from Apache, you should choose a name for the logfile ending in ``.log`` or ``.out``. If you have to, and you are using the default configuration from Apache, you should choose a name for the logfile ending in ``.log`` or ``.out``.
Should you use another web server, please make sure that you have the correct accessrules in place so that your log files are not accessible. Should you use another web server, please make sure that you have the correct access rules in place so that your log files are not accessible.
There are five different log levels: Normal, Trace, Debug, Data and All. There are five different log levels: Normal, Trace, Debug, Data and All.
Specifying different verbosities of information and data written out to the log file. Specifying different verbosity of information and data written out to the log file.
Normally you should not need to log at all. Normally you should not need to log at all.
The *DEBUG* level will show a good deal of information about system activity but will not include detailed data. The *DEBUG* level will show a good deal of information about system activity but will not include detailed data.
In the *ALL* level Friendica will log everything to the file. In the *ALL* level Friendica will log everything to the file.
@ -324,8 +324,8 @@ You should set up some kind of [log rotation](https://en.wikipedia.org/wiki/Log_
**Known Issues**: The filename ``friendica.log`` can cause problems depending on your server configuration (see [issue 2209](https://github.com/friendica/friendica/issues/2209)). **Known Issues**: The filename ``friendica.log`` can cause problems depending on your server configuration (see [issue 2209](https://github.com/friendica/friendica/issues/2209)).
By default PHP warnings and error messages are supressed. By default PHP warnings and error messages are suppressed.
If you want to enable those, you have to activate them in the ``config/local.ini.php`` file. If you want to enable those, you have to activate them in the ``config/local.config.php`` file.
Use the following settings to redirect PHP errors to a file. Use the following settings to redirect PHP errors to a file.
Config: Config:
@ -345,7 +345,7 @@ If you encounter a blank (white) page when using the application, view the PHP l
## Diagnostics ## Diagnostics
In this section of the admin panel you find two tools to investigate what Friendica sees for certain ressources. In this section of the admin panel you find two tools to investigate what Friendica sees for certain resources.
These tools can help to clarify communication problems. These tools can help to clarify communication problems.
For the *probe address* Friendica will display information for the address provided. For the *probe address* Friendica will display information for the address provided.
@ -359,12 +359,15 @@ These are the data base settings, the admin account settings, the path of PHP an
## DB Settings ## DB Settings
With the following settings, you specify the data base server, the username and passwort for Friendica and the database to use. With the following settings, you specify the data base server, the username and password for Friendica and the database to use.
$db_host = 'your.db.host'; 'database' => [
$db_user = 'db_username'; 'hostname' => 'localhost',
$db_pass = 'db_password'; 'username' => 'mysqlusername',
$db_data = 'database_name'; 'password' => 'mysqlpassword',
'database' => 'mysqldatabasename',
'charset' => 'utf8mb4',
],
## Admin users ## Admin users
@ -373,27 +376,30 @@ By default this will be the one account you create during the installation proce
But you can expand the list of email addresses by any used email address you want. But you can expand the list of email addresses by any used email address you want.
Registration of new accounts with a listed email address is not possible. Registration of new accounts with a listed email address is not possible.
[config] 'config' => [
admin_email = you@example.com, buddy@example.com 'admin_email' => 'you@example.com, buddy@example.com',
],
## PHP Path ## PHP Path
Some of Friendicas processes are running in the background. Some of Friendica's processes are running in the background.
For this you need to specify the path to the PHP binary to be used. For this you need to specify the path to the PHP binary to be used.
[config] 'config' => [
php_path = {{$phpath}} 'php_path' => '/usr/bin/php',
],
## Subdirectory configuration ## Subdirectory configuration
It is possible to install Friendica into a subdirectory of your webserver. It is possible to install Friendica into a subdirectory of your web server.
We strongly discourage you from doing so, as this will break federation to other networks (e.g. Diaspora, GNU Socia, Hubzilla) We strongly discourage you from doing so, as this will break federation to other networks (e.g. Diaspora, GNU Social, Hubzilla)
Say you have a subdirectory for tests and put Friendica into a further subdirectory, the config would be: Say you have a subdirectory for tests and put Friendica into a further subdirectory, the config would be:
[system] 'system' => [
urlpath = tests/friendica 'urlpath' => 'tests/friendica',
],
## Other exceptions ## Other exceptions
Furthermore there are some experimental settings, you can read-up in the [Config values that can only be set in config/local.ini.php](help/Config) section of the documentation. Furthermore there are some experimental settings, you can read-up in the [Config values that can only be set in config/local.config.php](help/Config) section of the documentation.

View file

@ -7,7 +7,7 @@ Updating Friendica
If you installed Friendica in the ``path/to/friendica`` folder: If you installed Friendica in the ``path/to/friendica`` folder:
1. Unpack the new Friendica archive in ``path/to/friendica_new``. 1. Unpack the new Friendica archive in ``path/to/friendica_new``.
2. Copy ``config/local.ini.php``, ``photo/`` and ``proxy/`` from ``path/to/friendica`` to ``path/to/friendica_new``. 2. Copy ``config/local.config.php``, ``photo/`` and ``proxy/`` from ``path/to/friendica`` to ``path/to/friendica_new``.
3. Rename the ``path/to/friendica`` folder to ``path/to/friendica_old``. 3. Rename the ``path/to/friendica`` folder to ``path/to/friendica_old``.
4. Rename the ``path/to/friendica_new`` folder to ``path/to/friendica``. 4. Rename the ``path/to/friendica_new`` folder to ``path/to/friendica``.
5. Check your site. Note: it may go into maintenance mode to update the database schema. 5. Check your site. Note: it may go into maintenance mode to update the database schema.

View file

@ -42,7 +42,7 @@ This will not delete the virtual machine.
9. To ultimately delete the virtual machine run 9. To ultimately delete the virtual machine run
$> vagrant destroy $> vagrant destroy
$> rm /vagrant/config/local.ini.php $> rm /vagrant/config/local.config.php
to make sure that you can start from scratch with another "vagrant up". to make sure that you can start from scratch with another "vagrant up".
@ -53,6 +53,6 @@ You will then have the following accounts to login:
* friendica1, password friendica1 * friendica1, password friendica1
* friendica2, password friendica2 and so on until friendica5 * friendica2, password friendica2 and so on until friendica5
* friendica1 is connected to all others. friendica1 has two groups: group1 with friendica2 and friendica4, group2 with friendica3 and friendica5. * friendica1 is connected to all others. friendica1 has two groups: group1 with friendica2 and friendica4, group2 with friendica3 and friendica5.
* friendica2 and friendica3 are conntected. friendica4 and friendica5 are connected. * friendica2 and friendica3 are connected. friendica4 and friendica5 are connected.
For further documentation of vagrant, please see [the vagrant*docs*](https://docs.vagrantup.com/v2/). For further documentation of vagrant, please see [the vagrant*docs*](https://docs.vagrantup.com/v2/).

View file

@ -199,7 +199,7 @@ Admin
Ja, das ist möglich. Ja, das ist möglich.
Es ist allerdings nicht möglich, eine Datenbank durch zwei Domains zu nutzen. Es ist allerdings nicht möglich, eine Datenbank durch zwei Domains zu nutzen.
Solange Du Deine config/local.ini.php allerdings so einrichtest, dass das System nicht versucht, eine Installation durchzuführen, kannst Du die richtige Config-Datei in include/$hostname/config/local.ini.php hinterlegen. Solange Du Deine config/local.config.php allerdings so einrichtest, dass das System nicht versucht, eine Installation durchzuführen, kannst Du die richtige Config-Datei in include/$hostname/config/local.config.php hinterlegen.
Alle Cache-Aspekte und der Zugriffsschutz können pro Instanz konfiguriert werden. Alle Cache-Aspekte und der Zugriffsschutz können pro Instanz konfiguriert werden.
<a name="sources"></a> <a name="sources"></a>
@ -216,13 +216,13 @@ Wenn Du neue Themen suchst, findest Du sie auf [Friendica-Themes.com](http://fri
<a name="adminaccount1"></a> <a name="adminaccount1"></a>
### Ich habe meine E-Mail Adresse geändern und jetzt ist das Admin Panel verschwunden? ### Ich habe meine E-Mail Adresse geändern und jetzt ist das Admin Panel verschwunden?
Bitte aktualisiere deine E-Mail Adresse in der <tt>config/local.ini.php</tt> Datei. Bitte aktualisiere deine E-Mail Adresse in der <tt>config/local.config.php</tt> Datei.
<a name="adminaccount2"></a> <a name="adminaccount2"></a>
### Kann es mehr als einen Admin auf einer Friendica Instanz geben? ### Kann es mehr als einen Admin auf einer Friendica Instanz geben?
Ja. Ja.
Du kannst in der <tt>config/local.ini.php</tt> Datei mehrere E-Mail Adressen auflisten. Du kannst in der <tt>config/local.config.php</tt> Datei mehrere E-Mail Adressen auflisten.
Die aufgelisteten Adressen werden mit Kommata von einander getrennt. Die aufgelisteten Adressen werden mit Kommata von einander getrennt.
<a name="dbupdate"> <a name="dbupdate">

View file

@ -34,7 +34,7 @@ Friendica - Dokumentation und Ressourcen
* [Konnektoren (Connectors) installieren (Twitter/GNU Social)](help/Installing-Connectors) * [Konnektoren (Connectors) installieren (Twitter/GNU Social)](help/Installing-Connectors)
* [Installation eines ejabberd Servers (XMPP-Chat) mit synchronisierten Anmeldedaten](help/install-ejabberd) (EN) * [Installation eines ejabberd Servers (XMPP-Chat) mit synchronisierten Anmeldedaten](help/install-ejabberd) (EN)
* [Betreibe deine Seite mit einem SSL-Zertifikat](help/SSL) * [Betreibe deine Seite mit einem SSL-Zertifikat](help/SSL)
* [Konfigurationswerte, die nur in der config/local.ini.php gesetzt werden können](help/Config) (EN) * [Konfigurationswerte, die nur in der config/local.config.php gesetzt werden können](help/Config) (EN)
* [Performance verbessern](help/Improve-Performance) * [Performance verbessern](help/Improve-Performance)
* [Administration Werkzeuge](help/tools) (EN) * [Administration Werkzeuge](help/tools) (EN)

View file

@ -112,18 +112,18 @@ Bitte beachte jeden Fehler und korrigiere diese, bevor du fortfährst.
Falls du einen Port für die Datenbankverbindung angeben musst, kannst du diesen in der Host-Eingabe Zeile angeben. Falls du einen Port für die Datenbankverbindung angeben musst, kannst du diesen in der Host-Eingabe Zeile angeben.
*Wenn* die manuelle Installation aus irgendeinem Grund fehlschlägt, dann prüfe das Folgende: *Wenn* die manuelle Installation aus irgendeinem Grund fehlschlägt, dann prüfe das Folgende:
* "config/local.ini.php" existiert ... wenn nicht, bearbeite die „config/local-sample.ini.php“ und ändere die Systemeinstellungen. Benenne sie um in „config/local.ini.php". * "config/local.config.php" existiert ... wenn nicht, bearbeite die „config/local-sample.config.php“ und ändere die Systemeinstellungen. Benenne sie um in „config/local.config.php".
* die Datenbank beinhaltet Daten. ... wenn nicht, importiere den Inhalt der Datei "database.sql" mit phpmyadmin oder per mysql-Kommandozeile. * die Datenbank beinhaltet Daten. ... wenn nicht, importiere den Inhalt der Datei "database.sql" mit phpmyadmin oder per mysql-Kommandozeile.
Besuche deine Seite an diesem Punkt wieder und registriere deinen persönlichen Account. Besuche deine Seite an diesem Punkt wieder und registriere deinen persönlichen Account.
Alle Registrierungsprobleme sollten automatisch behebbar sein. Alle Registrierungsprobleme sollten automatisch behebbar sein.
Wenn du irgendwelche **kritischen** Fehler zu diesen Zeitpunkt erhalten solltest, deutet das darauf hin, dass die Datenbank nicht korrekt installiert wurde. Wenn du irgendwelche **kritischen** Fehler zu diesen Zeitpunkt erhalten solltest, deutet das darauf hin, dass die Datenbank nicht korrekt installiert wurde.
Du kannst bei Bedarf die Datei config/local.ini.php verschieben/umbenennen und die Datenbank leeren (als „Dropping“ bezeichnet), so dass du mit einem sauberen System neu starten kannst. Du kannst bei Bedarf die Datei config/local.config.php verschieben/umbenennen und die Datenbank leeren (als „Dropping“ bezeichnet), so dass du mit einem sauberen System neu starten kannst.
### Option B: Starte das automatische Installationsscript ### Option B: Starte das automatische Installationsscript
Es existieren folgende Varianten zur automatischen Installation von Friendica: Es existieren folgende Varianten zur automatischen Installation von Friendica:
- Eine vorgefertigte Konfigurationsdatei erstellen (z.B. `prepared.ini.php`) - Eine vorgefertigte Konfigurationsdatei erstellen (z.B. `prepared.config.php`)
- Verwendung von Umgebungsvariablen (z.B. `MYSQL_HOST`) - Verwendung von Umgebungsvariablen (z.B. `MYSQL_HOST`)
- Verwendung von Optionen (z.B. `--dbhost <host>`) - Verwendung von Optionen (z.B. `--dbhost <host>`)
@ -139,17 +139,17 @@ Falls du alle optionalen Checks ausfürehn lassen möchtest, benutze diese Optio
bin/console autoinstall -a bin/console autoinstall -a
*Wenn* die automatisierte Installation aus irgendeinem Grund fehlschlägt, dann prüfe das Folgende: *Wenn* die automatisierte Installation aus irgendeinem Grund fehlschlägt, dann prüfe das Folgende:
* Existiert die `config/local.ini.php`? Falls ja, wird die automatisierte Installation nicht gestartet. * Existiert die `config/local.config.php`? Falls ja, wird die automatisierte Installation nicht gestartet.
* Sind Einstellungen in der `config/local.ini.php` korrekt? Falls nicht, bitte bearbeite diese Datei erneut. * Sind Einstellungen in der `config/local.config.php` korrekt? Falls nicht, bitte bearbeite diese Datei erneut.
* Ist die leere MySQL-Datenbank erstellt? Falls nicht, erstelle diese. * Ist die leere MySQL-Datenbank erstellt? Falls nicht, erstelle diese.
#### B.1: Konfigurationsdatei #### B.1: Konfigurationsdatei
Für diese Variante muss ein Konfigurationsdatei bereits vor der Installation fertig definiert sein (z.B. [local-sample.ini.php](config/local-sample.ini.php). Für diese Variante muss ein Konfigurationsdatei bereits vor der Installation fertig definiert sein (z.B. [local-sample.config.php](config/local-sample.config.php).
Gehe im Anschluss in den Friendica-Hauptordner und führe den Kommandozeilen Befehl aus: Gehe im Anschluss in den Friendica-Hauptordner und führe den Kommandozeilen Befehl aus:
bin/console autoinstall -f <prepared.ini.php> bin/console autoinstall -f <prepared.config.php>
#### B.2: Umgebungsvariablen #### B.2: Umgebungsvariablen
@ -161,7 +161,7 @@ Umgebungsvariablen können auch durch adäquate Optionen (z.B. `--dbhost <hostna
**Datenbank Einstellungen** **Datenbank Einstellungen**
Nur wenn die Option `--savedb` gesetzt ist, werden diese Umgebungsvariablen auch in `config/local.ini.php` gespeichert! Nur wenn die Option `--savedb` gesetzt ist, werden diese Umgebungsvariablen auch in `config/local.config.php` gespeichert!
- `MYSQL_HOST` Der Host der MySQL/MariaDB Datenbank - `MYSQL_HOST` Der Host der MySQL/MariaDB Datenbank
- `MYSQL_PORT` Der Port der MySQL/MariaDB Datenbank - `MYSQL_PORT` Der Port der MySQL/MariaDB Datenbank
@ -173,7 +173,7 @@ Nur wenn die Option `--savedb` gesetzt ist, werden diese Umgebungsvariablen auch
**Friendica Einstellungen** **Friendica Einstellungen**
Diese Umgebungsvariablen können nicht während des normalen Friendica Betriebs verwendet werden. Diese Umgebungsvariablen können nicht während des normalen Friendica Betriebs verwendet werden.
Sie werden stattdessen direkt in `config/local.ini.php` gespeichert. Sie werden stattdessen direkt in `config/local.config.php` gespeichert.
- `FRIENDICA_PHP_PATH` Der Pfad zur PHP-Datei - `FRIENDICA_PHP_PATH` Der Pfad zur PHP-Datei
- `FRIENDICA_ADMIN_MAIL` Die Admin E-Mail Adresse dieses Friendica Knotens (wird auch für den Admin-Zugang benötigt) - `FRIENDICA_ADMIN_MAIL` Die Admin E-Mail Adresse dieses Friendica Knotens (wird auch für den Admin-Zugang benötigt)
@ -186,7 +186,7 @@ Gehe im Anschluss in den Friendica-Hauptordner und führe den Kommandozeilen Bef
#### B.3: Optionen #### B.3: Optionen
Alle Optionen werden in `config/local.ini.php` gespeichert und überschreiben etwaige, zugehörige Umgebungsvariablen. Alle Optionen werden in `config/local.config.php` gespeichert und überschreiben etwaige, zugehörige Umgebungsvariablen.
- `-H|--dbhost <host>` Der Host der MySQL/MariaDB Datenbank (env `MYSQL_HOST`) - `-H|--dbhost <host>` Der Host der MySQL/MariaDB Datenbank (env `MYSQL_HOST`)
- `-p|--dbport <port>` Der Port der MySQL/MariaDB Datenbank (env `MYSQL_PORT`) - `-p|--dbport <port>` Der Port der MySQL/MariaDB Datenbank (env `MYSQL_PORT`)
@ -227,5 +227,5 @@ Es werden schlimme Dinge geschehen.
Sei es nun ein Hardwareversagen oder eine kaputte Datenbank. Sei es nun ein Hardwareversagen oder eine kaputte Datenbank.
Deshalb solltest du dir, nachdem die Installation deines Friendica Knotens abgeschlossen ist, einen Backup Plan erstellen. Deshalb solltest du dir, nachdem die Installation deines Friendica Knotens abgeschlossen ist, einen Backup Plan erstellen.
Die wichtigste Datei ist die `config/local.ini.php` im Stammverzeichnis deiner Friendica Installation. Die wichtigste Datei ist die `config/local.config.php` im Stammverzeichnis deiner Friendica Installation.
Und da alle Daten in der Datenbank gespeichert werden, solltest du einen nicht all zu alten Dump der Friendica Datenbank zur Hand haben, solltest du deinen Knoten wieder herstellen müssen. Und da alle Daten in der Datenbank gespeichert werden, solltest du einen nicht all zu alten Dump der Friendica Datenbank zur Hand haben, solltest du deinen Knoten wieder herstellen müssen.

View file

@ -18,7 +18,7 @@ Erweiterung müssen vom Administrator installiert werden, bevor sie genutzt werd
Dieses kann über das Administrationsmenü erstellt werden. Dieses kann über das Administrationsmenü erstellt werden.
Jeder der Konnektoren benötigt zudem einen API-Schlüssel vom Service, der verbunden werden soll. Jeder der Konnektoren benötigt zudem einen API-Schlüssel vom Service, der verbunden werden soll.
Einige Erweiterung erlaube es, diese Informationen auf den Administrationsseiten einzustellen, wohingegen andere eine direkte Bearbeitung der Konfigurationsdatei "config/local.ini.php" erfordern. Einige Erweiterung erlaube es, diese Informationen auf den Administrationsseiten einzustellen, wohingegen andere eine direkte Bearbeitung der Konfigurationsdatei "config/local.config.php" erfordern.
Der Weg, um diese Schlüssel zu erhalten, variiert stark, jedoch brauchen fast alle einen bestehenden Account im gewünschten Service. Der Weg, um diese Schlüssel zu erhalten, variiert stark, jedoch brauchen fast alle einen bestehenden Account im gewünschten Service.
Einmal installiert, können diese Schlüssel von allen Seitennutzern genutzt werden. Einmal installiert, können diese Schlüssel von allen Seitennutzern genutzt werden.
@ -37,7 +37,7 @@ Um dieses Erweiterung zu nutzen, benötigst du einen OAuth Consumer-Schlüsselpa
Registriere deine Friendica-Seite als "Client"-Anwendung mit "Read&Write"-Zugriff. Wir benötigen "Twitter als Login" nicht. Sobald du deine Anwendung installiert hast, erhältst du das Schlüsselpaar für deine Seite. Registriere deine Friendica-Seite als "Client"-Anwendung mit "Read&Write"-Zugriff. Wir benötigen "Twitter als Login" nicht. Sobald du deine Anwendung installiert hast, erhältst du das Schlüsselpaar für deine Seite.
Trage dieses Schlüsselpaar in deine globale "config/local.ini.php"-Datei ein. Trage dieses Schlüsselpaar in deine globale "config/local.config.php"-Datei ein.
``` ```
[twitter] [twitter]

View file

@ -66,7 +66,7 @@ Dabei kannst du zwischen den folgenden Optionen wählen:
##### Einladungen ##### Einladungen
Zusätzlich zu den oben genannten Möglichkeiten, kann die Registrierung eines neuen Nutzerkontos an eine Einladung durch einen bestehenden Nutzer gekoppelt werden. Zusätzlich zu den oben genannten Möglichkeiten, kann die Registrierung eines neuen Nutzerkontos an eine Einladung durch einen bestehenden Nutzer gekoppelt werden.
Hierzu muss in der [config/local.ini.php](/help/Config) Datei die Option `invitation_only` aktiviert und als Registrierungsmethode entweder *Offen* oder *Bedarf der Zustimmung* gewählt werden. Hierzu muss in der [config/local.config.php](/help/Config) Datei die Option `invitation_only` aktiviert und als Registrierungsmethode entweder *Offen* oder *Bedarf der Zustimmung* gewählt werden.
#### Namen auf Vollständigkeit überprüfen #### Namen auf Vollständigkeit überprüfen
@ -313,7 +313,7 @@ Du solltest deshalb einen Dienst zur [log rotation](https://en.wikipedia.org/wik
**Bekannte Probleme**: Der Dateiname `friendica.log` kann bei speziellen Server Konfigurationen zu Problemen führen (siehe [issue 2209](https://github.com/friendica/friendica/issues/2209)). **Bekannte Probleme**: Der Dateiname `friendica.log` kann bei speziellen Server Konfigurationen zu Problemen führen (siehe [issue 2209](https://github.com/friendica/friendica/issues/2209)).
Normalerweise werden Fehler- und Warnmeldungen von PHP unterdrückt. Normalerweise werden Fehler- und Warnmeldungen von PHP unterdrückt.
Wenn du sie aktivieren willst, musst du folgendes in der `config/local.ini.php` Datei eintragen um die Meldungen in die Datei `php.out` zu speichern Wenn du sie aktivieren willst, musst du folgendes in der `config/local.config.php` Datei eintragen um die Meldungen in die Datei `php.out` zu speichern
error_reporting(E_ERROR | E_WARNING | E_PARSE ); error_reporting(E_ERROR | E_WARNING | E_PARSE );
ini_set('error_log','php.out'); ini_set('error_log','php.out');
@ -347,10 +347,13 @@ Dies sind die Datenbank Einstellungen, die Administrator Accounts, der PHP Pfad
Mit den folgenden Einstellungen kannst du die Zugriffsdaten für den Datenbank Server festlegen. Mit den folgenden Einstellungen kannst du die Zugriffsdaten für den Datenbank Server festlegen.
$db_host = 'your.db.host'; 'database' => [
$db_user = 'db_username'; 'hostname' => 'localhost',
$db_pass = 'db_password'; 'username' => 'mysqlusername',
$db_data = 'database_name'; 'password' => 'mysqlpassword',
'database' => 'mysqldatabasename',
'charset' => 'utf8mb4',
],
Sollten alle der folgenden Environment-Variablen gesetzt sein, wird Friendica diese anstatt der vorher konfigurierten Werte nutzen. Sollten alle der folgenden Environment-Variablen gesetzt sein, wird Friendica diese anstatt der vorher konfigurierten Werte nutzen.
@ -367,16 +370,18 @@ Normalerweise trifft dies auf den ersten Account zu, der nach der Installation a
Die Liste der E-Mail Adressen kann aber einfach erweitert werden. Die Liste der E-Mail Adressen kann aber einfach erweitert werden.
Mit keiner der angegebenen E-Mail Adressen können weitere Accounts registriert werden. Mit keiner der angegebenen E-Mail Adressen können weitere Accounts registriert werden.
[config] 'config' => [
admin_email = you@example.com, buddy@example.com 'admin_email' => 'you@example.com, buddy@example.com',
],
## PHP Pfad ## PHP Pfad
Einige Prozesse von Friendica laufen im Hintergrund. Einige Prozesse von Friendica laufen im Hintergrund.
Für diese Prozesse muss der Pfad zu der PHP Version gesetzt sein, die verwendet werden soll. Für diese Prozesse muss der Pfad zu der PHP Version gesetzt sein, die verwendet werden soll.
[config] 'config' => [
php_path = {{$phpath}} 'php_path' => '/usr/bin/php',
],
## Unterverzeichnis Konfiguration ## Unterverzeichnis Konfiguration
@ -384,10 +389,11 @@ Man kann Friendica in ein Unterverzeichnis des Webservers installieren.
Wir raten allerdings dringen davon ab, da es die Interoperabilität mit anderen Netzwerken (z.B. Diaspora, GNU Social, Hubzilla) verhindert. Wir raten allerdings dringen davon ab, da es die Interoperabilität mit anderen Netzwerken (z.B. Diaspora, GNU Social, Hubzilla) verhindert.
Mal angenommen, du hast ein Unterverzeichnis tests und willst Friendica in ein weiteres Unterverzeichnis installieren, dann lautet die Konfiguration hierfür: Mal angenommen, du hast ein Unterverzeichnis tests und willst Friendica in ein weiteres Unterverzeichnis installieren, dann lautet die Konfiguration hierfür:
[system] 'system' => [
urlpath = tests/friendica 'urlpath' => 'tests/friendica',
],
## Weitere Ausnahmen ## Weitere Ausnahmen
Es gibt noch einige experimentelle Einstellungen, die nur in der ``config/local.ini.php`` Datei konfiguriert werden können. Es gibt noch einige experimentelle Einstellungen, die nur in der ``config/local.config.php`` Datei konfiguriert werden können.
Im [Konfigurationswerte, die nur in der config/local.ini.php gesetzt werden können (EN)](help/Config) Artikel kannst du mehr darüber erfahren. Im [Konfigurationswerte, die nur in der config/local.config.php gesetzt werden können (EN)](help/Config) Artikel kannst du mehr darüber erfahren.

View file

@ -914,7 +914,7 @@ function admin_page_summary(App $a)
// Legacy config file warning // Legacy config file warning
if (file_exists('.htconfig.php')) { if (file_exists('.htconfig.php')) {
$showwarning = true; $showwarning = true;
$warningtext[] = L10n::t('Friendica\'s configuration now is stored in config/local.ini.php, please copy config/local-sample.ini.php and move your config from <code>.htconfig.php</code>. See <a href="%s">the Config help page</a> for help with the transition.', $a->getBaseURL() . '/help/Config'); $warningtext[] = L10n::t('Friendica\'s configuration now is stored in config/local.config.php, please copy config/local-sample.config.php and move your config from <code>.htconfig.php</code>. See <a href="%s">the Config help page</a> for help with the transition.', $a->getBaseURL() . '/help/Config');
} }
// Check server vitality // Check server vitality

View file

@ -214,7 +214,7 @@ class App
set_include_path( set_include_path(
get_include_path() . PATH_SEPARATOR get_include_path() . PATH_SEPARATOR
. $this->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR . $this->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR
. $this->getBasePath(). DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR . $this->getBasePath() . DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR
. $this->getBasePath()); . $this->getBasePath());
if (!empty($_SERVER['QUERY_STRING']) && strpos($_SERVER['QUERY_STRING'], 'pagename=') === 0) { if (!empty($_SERVER['QUERY_STRING']) && strpos($_SERVER['QUERY_STRING'], 'pagename=') === 0) {
@ -329,24 +329,24 @@ class App
* Load the configuration files * Load the configuration files
* *
* First loads the default value for all the configuration keys, then the legacy configuration files, then the * First loads the default value for all the configuration keys, then the legacy configuration files, then the
* expected local.ini.php * expected local.config.php
*/ */
private function loadConfigFiles() private function loadConfigFiles()
{ {
$this->loadConfigFile($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.ini.php'); $this->loadConfigFile($this->getBasePath() . '/config/defaults.config.php');
$this->loadConfigFile($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'settings.ini.php'); $this->loadConfigFile($this->getBasePath() . '/config/settings.config.php');
// Legacy .htconfig.php support // Legacy .htconfig.php support
if (file_exists($this->getBasePath() . DIRECTORY_SEPARATOR . '.htpreconfig.php')) { if (file_exists($this->getBasePath() . '/.htpreconfig.php')) {
$a = $this; $a = $this;
include $this->getBasePath() . DIRECTORY_SEPARATOR . '.htpreconfig.php'; include $this->getBasePath() . '/.htpreconfig.php';
} }
// Legacy .htconfig.php support // Legacy .htconfig.php support
if (file_exists($this->getBasePath() . DIRECTORY_SEPARATOR . '.htconfig.php')) { if (file_exists($this->getBasePath() . '/.htconfig.php')) {
$a = $this; $a = $this;
include $this->getBasePath() . DIRECTORY_SEPARATOR . '.htconfig.php'; include $this->getBasePath() . '/.htconfig.php';
$this->setConfigValue('database', 'hostname', $db_host); $this->setConfigValue('database', 'hostname', $db_host);
$this->setConfigValue('database', 'username', $db_user); $this->setConfigValue('database', 'username', $db_user);
@ -374,24 +374,50 @@ class App
} }
} }
if (file_exists($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php')) { if (file_exists($this->getBasePath() . '/config/local.config.php')) {
$this->loadConfigFile($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php', true); $this->loadConfigFile($this->getBasePath() . '/config/local.config.php', true);
} elseif (file_exists($this->getBasePath() . '/config/local.ini.php')) {
$this->loadINIConfigFile($this->getBasePath() . '/config/local.ini.php', true);
} }
} }
/**
* Tries to load the specified legacy configuration file into the App->config array.
* Doesn't overwrite previously set values by default to prevent default config files to supersede DB Config.
*
* @deprecated since version 2018.12
* @param string $filepath
* @param bool $overwrite Force value overwrite if the config key already exists
* @throws Exception
*/
public function loadINIConfigFile($filepath, $overwrite = false)
{
if (!file_exists($filepath)) {
throw new Exception('Error parsing non-existent INI config file ' . $filepath);
}
$contents = include($filepath);
$config = parse_ini_string($contents, true, INI_SCANNER_TYPED);
if ($config === false) {
throw new Exception('Error parsing INI config file ' . $filepath);
}
$this->loadConfigArray($config, $overwrite);
}
/** /**
* Tries to load the specified configuration file into the App->config array. * Tries to load the specified configuration file into the App->config array.
* Doesn't overwrite previously set values by default to prevent default config files to supersede DB Config. * Doesn't overwrite previously set values by default to prevent default config files to supersede DB Config.
* *
* The config format is INI and the template for configuration files is the following: * The config format is PHP array and the template for configuration files is the following:
* *
* <?php return <<<INI * <?php return [
* * 'section' => [
* [section] * 'key' => 'value',
* key = value * ],
* * ];
* INI;
* // Keep this line
* *
* @param string $filepath * @param string $filepath
* @param bool $overwrite Force value overwrite if the config key already exists * @param bool $overwrite Force value overwrite if the config key already exists
@ -400,17 +426,46 @@ class App
public function loadConfigFile($filepath, $overwrite = false) public function loadConfigFile($filepath, $overwrite = false)
{ {
if (!file_exists($filepath)) { if (!file_exists($filepath)) {
throw new Exception('Error parsing non-existent config file ' . $filepath); throw new Exception('Error loading non-existent config file ' . $filepath);
} }
$contents = include($filepath); $config = include($filepath);
$config = parse_ini_string($contents, true, INI_SCANNER_TYPED); if (!is_array($config)) {
throw new Exception('Error loading config file ' . $filepath);
if ($config === false) {
throw new Exception('Error parsing config file ' . $filepath);
} }
$this->loadConfigArray($config, $overwrite);
}
/**
* Loads addons configuration files
*
* First loads all activated addons default configuration through the load_config hook, then load the local.config.php
* again to overwrite potential local addon configuration.
*/
private function loadAddonConfig()
{
// Loads addons default config
Core\Hook::callAll('load_config');
// Load the local addon config file to overwritten default addon config values
if (file_exists($this->getBasePath() . '/config/addon.config.php')) {
$this->loadConfigFile($this->getBasePath() . '/config/addon.config.php', true);
} elseif (file_exists($this->getBasePath() . '/config/addon.ini.php')) {
$this->loadINIConfigFile($this->getBasePath() . '/config/addon.ini.php', true);
}
}
/**
* Tries to load the specified configuration array into the App->config array.
* Doesn't overwrite previously set values by default to prevent default config files to supersede DB Config.
*
* @param array $config
* @param bool $overwrite Force value overwrite if the config key already exists
*/
private function loadConfigArray(array $config, $overwrite = false)
{
foreach ($config as $category => $values) { foreach ($config as $category => $values) {
foreach ($values as $key => $value) { foreach ($values as $key => $value) {
if ($overwrite) { if ($overwrite) {
@ -422,23 +477,6 @@ class App
} }
} }
/**
* Loads addons configuration files
*
* First loads all activated addons default configuration throught the load_config hook, then load the local.ini.php
* again to overwrite potential local addon configuration.
*/
private function loadAddonConfig()
{
// Loads addons default config
Core\Addon::callHooks('load_config');
// Load the local addon config file to overwritten default addon config values
if (file_exists($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'addon.ini.php')) {
$this->loadConfigFile($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'addon.ini.php', true);
}
}
/** /**
* Loads the default timezone * Loads the default timezone
* *
@ -661,8 +699,8 @@ class App
$this->urlPath = trim($parsed['path'], '\\/'); $this->urlPath = trim($parsed['path'], '\\/');
} }
if (file_exists($this->getBasePath() . DIRECTORY_SEPARATOR . '.htpreconfig.php')) { if (file_exists($this->getBasePath() . '/.htpreconfig.php')) {
include $this->getBasePath() . DIRECTORY_SEPARATOR . '.htpreconfig.php'; include $this->getBasePath() . '/.htpreconfig.php';
} }
if (Core\Config::get('config', 'hostname') != '') { if (Core\Config::get('config', 'hostname') != '') {

View file

@ -52,8 +52,9 @@ class Mode
$this->mode = 0; $this->mode = 0;
if (!file_exists($this->basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php') if (!file_exists($this->basepath . '/config/local.config.php')
&& !file_exists($this->basepath . DIRECTORY_SEPARATOR . '.htconfig.php')) { && !file_exists($this->basepath . '/config/local.ini.php')
&& !file_exists($this->basepath . '/.htconfig.php')) {
return; return;
} }

View file

@ -65,13 +65,13 @@ class JITConfigAdapter extends BaseObject implements IConfigAdapter
$this->in_db[$cat][$k] = true; $this->in_db[$cat][$k] = true;
return $value; return $value;
} elseif (isset($a->config[$cat][$k])) { } elseif (isset($a->config[$cat][$k])) {
// Assign the value (mostly) from config/local.ini.php file to the cache // Assign the value (mostly) from config/local.config.php file to the cache
$this->cache[$cat][$k] = $a->config[$cat][$k]; $this->cache[$cat][$k] = $a->config[$cat][$k];
$this->in_db[$cat][$k] = false; $this->in_db[$cat][$k] = false;
return $a->config[$cat][$k]; return $a->config[$cat][$k];
} elseif (isset($a->config[$k])) { } elseif (isset($a->config[$k])) {
// Assign the value (mostly) from config/local.ini.php file to the cache // Assign the value (mostly) from config/local.config.php file to the cache
$this->cache[$k] = $a->config[$k]; $this->cache[$k] = $a->config[$k];
$this->in_db[$k] = false; $this->in_db[$k] = false;

View file

@ -23,7 +23,7 @@ Synopsis
bin/console autoinstall [-h|--help|-?] [-v] [-a] [-f] bin/console autoinstall [-h|--help|-?] [-v] [-a] [-f]
Description Description
Installs Friendica with data based on the local.ini.php file or environment variables Installs Friendica with data based on the local.config.php file or environment variables
Notes Notes
Not checking .htaccess/URL-Rewrite during CLI installation. Not checking .htaccess/URL-Rewrite during CLI installation.
@ -32,7 +32,7 @@ Options
-h|--help|-? Show help information -h|--help|-? Show help information
-v Show more debug information. -v Show more debug information.
-a All setup checks are required (except .htaccess) -a All setup checks are required (except .htaccess)
-f|--file <config> prepared config file (e.g. "config/local.ini.php" itself) which will override every other config option - except the environment variables) -f|--file <config> prepared config file (e.g. "config/local.config.php" itself) which will override every other config option - except the environment variables)
-s|--savedb Save the DB credentials to the file (if environment variables is used) -s|--savedb Save the DB credentials to the file (if environment variables is used)
-H|--dbhost <host> The host of the mysql/mariadb database (env MYSQL_HOST) -H|--dbhost <host> The host of the mysql/mariadb database (env MYSQL_HOST)
-p|--dbport <port> The port of the mysql/mariadb database (env MYSQL_PORT) -p|--dbport <port> The port of the mysql/mariadb database (env MYSQL_PORT)
@ -58,11 +58,11 @@ Environment variables
FRIENDICA_LANG The langauge of Friendica FRIENDICA_LANG The langauge of Friendica
Examples Examples
bin/console autoinstall -f 'input.ini.php bin/console autoinstall -f 'input.config.php
Installs Friendica with the prepared 'input.ini.php' file Installs Friendica with the prepared 'input.config.php' file
bin/console autoinstall --savedb bin/console autoinstall --savedb
Installs Friendica with environment variables and saves them to the 'config/local.ini.php' file Installs Friendica with environment variables and saves them to the 'config/local.config.php' file
bin/console autoinstall -h localhost -p 3365 -U user -P passwort1234 -d friendica bin/console autoinstall -h localhost -p 3365 -U user -P passwort1234 -d friendica
Installs Friendica with a local mysql database with credentials Installs Friendica with a local mysql database with credentials
@ -96,11 +96,11 @@ HELP;
$config_file = $this->getOption(['f', 'file']); $config_file = $this->getOption(['f', 'file']);
if (!empty($config_file)) { if (!empty($config_file)) {
if ($config_file != 'config' . DIRECTORY_SEPARATOR . 'local.ini.php') { if ($config_file != 'config' . DIRECTORY_SEPARATOR . 'local.config.php') {
// Copy config file // Copy config file
$this->out("Copying config file...\n"); $this->out("Copying config file...\n");
if (!copy($a->getBasePath() . DIRECTORY_SEPARATOR . $config_file, $a->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php')) { if (!copy($a->getBasePath() . DIRECTORY_SEPARATOR . $config_file, $a->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.config.php')) {
throw new RuntimeException("ERROR: Saving config file failed. Please copy '$config_file' to '" . $a->getBasePath() . "'" . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "local.ini.php' manually.\n"); throw new RuntimeException("ERROR: Saving config file failed. Please copy '$config_file' to '" . $a->getBasePath() . "'" . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "local.config.php' manually.\n");
} }
} }
@ -175,7 +175,7 @@ HELP;
Theme::install(Config::get('system', 'theme')); Theme::install(Config::get('system', 'theme'));
$this->out(" Complete\n\n"); $this->out(" Complete\n\n");
} else { } else {
$this->out(" Theme setting is empty. Please check the file 'config/local.ini.php'\n\n"); $this->out(" Theme setting is empty. Please check the file 'config/local.config.php'\n\n");
} }
$this->out("\nInstallation is finished\n"); $this->out("\nInstallation is finished\n");

View file

@ -59,7 +59,7 @@ Description
Sets the value of the provided key in the category Sets the value of the provided key in the category
Notes: Notes:
Setting config entries which are manually set in config/local.ini.php may result in Setting config entries which are manually set in config/local.config.php may result in
conflict between database settings and the manual startup settings. conflict between database settings and the manual startup settings.
Options Options

View file

@ -123,7 +123,7 @@ class Installer
/** /**
* Executes the installation of Friendica in the given environment. * Executes the installation of Friendica in the given environment.
* - Creates `config/local.ini.php` * - Creates `config/local.config.php`
* - Installs Database Structure * - Installs Database Structure
* *
* @param string $phppath Path to the PHP-Binary (optional, if not set e.g. 'php' or '/usr/bin/php') * @param string $phppath Path to the PHP-Binary (optional, if not set e.g. 'php' or '/usr/bin/php')
@ -141,7 +141,7 @@ class Installer
*/ */
public function createConfig($phppath, $urlpath, $dbhost, $dbuser, $dbpass, $dbdata, $timezone, $language, $adminmail, $basepath) public function createConfig($phppath, $urlpath, $dbhost, $dbuser, $dbpass, $dbdata, $timezone, $language, $adminmail, $basepath)
{ {
$tpl = Renderer::getMarkupTemplate('local.ini.tpl'); $tpl = Renderer::getMarkupTemplate('local.config.tpl');
$txt = Renderer::replaceMacros($tpl, [ $txt = Renderer::replaceMacros($tpl, [
'$phpath' => $phppath, '$phpath' => $phppath,
'$dbhost' => $dbhost, '$dbhost' => $dbhost,
@ -154,10 +154,10 @@ class Installer
'$adminmail' => $adminmail, '$adminmail' => $adminmail,
]); ]);
$result = file_put_contents($basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php', $txt); $result = file_put_contents($basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.config.php', $txt);
if (!$result) { if (!$result) {
$this->addCheck(L10n::t('The database configuration file "config/local.ini.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.'), false, false, htmlentities($txt, ENT_COMPAT, 'UTF-8')); $this->addCheck(L10n::t('The database configuration file "config/local.config.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.'), false, false, htmlentities($txt, ENT_COMPAT, 'UTF-8'));
} }
return $result; return $result;
@ -444,9 +444,9 @@ class Installer
} }
/** /**
* "config/local.ini.php" - Check * "config/local.config.php" - Check
* *
* Checks if it's possible to create the "config/local.ini.php" * Checks if it's possible to create the "config/local.config.php"
* *
* @return bool false if something required failed * @return bool false if something required failed
*/ */
@ -454,17 +454,17 @@ class Installer
{ {
$status = true; $status = true;
$help = ""; $help = "";
if ((file_exists('config/local.ini.php') && !is_writable('config/local.ini.php')) || if ((file_exists('config/local.config.php') && !is_writable('config/local.config.php')) ||
(!file_exists('config/local.ini.php') && !is_writable('.'))) { (!file_exists('config/local.config.php') && !is_writable('.'))) {
$status = false; $status = false;
$help = L10n::t('The web installer needs to be able to create a file called "local.ini.php" in the "config" folder of your web server and it is unable to do so.') . EOL; $help = L10n::t('The web installer needs to be able to create a file called "local.config.php" in the "config" folder of your web server and it is unable to do so.') . EOL;
$help .= L10n::t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.') . EOL; $help .= L10n::t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.') . EOL;
$help .= L10n::t('At the end of this procedure, we will give you a text to save in a file named local.ini.php in your Friendica "config" folder.') . EOL; $help .= L10n::t('At the end of this procedure, we will give you a text to save in a file named local.config.php in your Friendica "config" folder.') . EOL;
$help .= L10n::t('You can alternatively skip this procedure and perform a manual installation. Please see the file "INSTALL.txt" for instructions.') . EOL; $help .= L10n::t('You can alternatively skip this procedure and perform a manual installation. Please see the file "INSTALL.txt" for instructions.') . EOL;
} }
$this->addCheck(L10n::t('config/local.ini.php is writable'), $status, false, $help); $this->addCheck(L10n::t('config/local.config.php is writable'), $status, false, $help);
// Local INI File is not required // Local INI File is not required
return true; return true;

View file

@ -28,7 +28,7 @@ class DBStructure
const UPDATE_FAILED = 2; // Database check failed const UPDATE_FAILED = 2; // Database check failed
/** /**
* Database structure definition loaded from config/dbstructure.php * Database structure definition loaded from config/dbstructure.config.php
* *
* @var array * @var array
*/ */
@ -783,10 +783,10 @@ class DBStructure
} }
/** /**
* Loads the database structure definition from the config/dbstructure.php file. * Loads the database structure definition from the config/dbstructure.config.php file.
* On first pass, defines DB_UPDATE_VERSION constant. * On first pass, defines DB_UPDATE_VERSION constant.
* *
* @see config/dbstructure.php * @see config/dbstructure.config.php
* @param boolean $with_addons_structure Whether to tack on addons additional tables * @param boolean $with_addons_structure Whether to tack on addons additional tables
* @return array * @return array
* @throws Exception * @throws Exception
@ -796,16 +796,16 @@ class DBStructure
if (!self::$definition) { if (!self::$definition) {
$a = \Friendica\BaseObject::getApp(); $a = \Friendica\BaseObject::getApp();
$filename = $a->getBasePath() . '/config/dbstructure.php'; $filename = $a->getBasePath() . '/config/dbstructure.config.php';
if (!is_readable($filename)) { if (!is_readable($filename)) {
throw new Exception('Missing database structure config file config/dbstructure.php'); throw new Exception('Missing database structure config file config/dbstructure.config.php');
} }
$definition = require $filename; $definition = require $filename;
if (!$definition) { if (!$definition) {
throw new Exception('Corrupted database structure config file config/dbstructure.php'); throw new Exception('Corrupted database structure config file config/dbstructure.config.php');
} }
self::$definition = $definition; self::$definition = $definition;

View file

@ -27,10 +27,10 @@ trait VFSTrait
// create a virtual directory and copy all needed files and folders to it // create a virtual directory and copy all needed files and folders to it
$this->root = vfsStream::setup('friendica', null, $structure); $this->root = vfsStream::setup('friendica', null, $structure);
$this->setConfigFile('config.ini.php'); $this->setConfigFile('defaults.config.php');
$this->setConfigFile('settings.ini.php'); $this->setConfigFile('settings.config.php');
$this->setConfigFile('local.ini.php'); $this->setConfigFile('local.config.php');
$this->setConfigFile('dbstructure.php'); $this->setConfigFile('dbstructure.config.php');
} }
/** /**

View file

@ -36,11 +36,11 @@ class ModeTest extends MockedTest
{ {
$mode = new Mode($this->root->url()); $mode = new Mode($this->root->url());
$this->assertTrue($this->root->hasChild('config/local.ini.php')); $this->assertTrue($this->root->hasChild('config/local.config.php'));
$this->delConfigFile('local.ini.php'); $this->delConfigFile('local.config.php');
$this->assertFalse($this->root->hasChild('config/local.ini.php')); $this->assertFalse($this->root->hasChild('config/local.config.php'));
$mode->determine(); $mode->determine();

View file

@ -41,9 +41,9 @@ class AutomaticInstallationConsoleTest extends ConsoleTest
{ {
parent::setUp(); parent::setUp();
if ($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.ini.php')) { if ($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.config.php')) {
$this->root->getChild('config') $this->root->getChild('config')
->removeChild('local.ini.php'); ->removeChild('local.config.php');
} }
$this->db_host = getenv('MYSQL_HOST'); $this->db_host = getenv('MYSQL_HOST');
@ -58,7 +58,7 @@ class AutomaticInstallationConsoleTest extends ConsoleTest
} }
/** /**
* Creates the arguments which is asserted to be passed to 'replaceMacros()' for creating the local.ini.php * Creates the arguments which is asserted to be passed to 'replaceMacros()' for creating the local.config.php
* *
* @param bool $withDb if true, DB will get saved too * @param bool $withDb if true, DB will get saved too
* *
@ -184,51 +184,53 @@ FIN;
$this->mockUpdate([false, true, true], null, 1); $this->mockUpdate([false, true, true], null, 1);
$config = <<<CONF $config = <<<CONF
<?php return <<<INI <?php
[database] // Local configuration
hostname =
username =
password =
database =
charset = utf8mb4
// If you're unsure about what any of the config keys below do, please check the config/defaults.config.php for detailed
// documentation of their data type and behavior.
; **************************************************************** return [
; The configuration below will be overruled by the admin panel. 'database' => [
; Changes made below will only have an effect if the database does 'hostname' => '',
; not contain any configuration for the friendica system. 'username' => '',
; **************************************************************** 'password' => '',
'database' => '',
'charset' => 'utf8mb4',
],
[config] // ****************************************************************
admin_email = // The configuration below will be overruled by the admin panel.
// Changes made below will only have an effect if the database does
sitename = Friendica Social Network // not contain any configuration for the friendica system.
// ****************************************************************
register_policy = REGISTER_OPEN
register_text =
[system]
default_timezone = UTC
language = en
INI;
// Keep this line
'config' => [
'admin_email' => '',
'sitename' => 'Friendica Social Network',
'register_policy' => REGISTER_OPEN,
'register_text' => '',
],
'system' => [
'default_timezone' => 'UTC',
'language' => 'en',
],
];
CONF; CONF;
vfsStream::newFile('prepared.ini.php') vfsStream::newFile('prepared.config.php')
->at($this->root) ->at($this->root)
->setContent($config); ->setContent($config);
$console = new AutomaticInstallation($this->consoleArgv); $console = new AutomaticInstallation($this->consoleArgv);
$console->setOption('f', 'prepared.ini.php'); $console->setOption('f', 'prepared.config.php');
$txt = $this->dumpExecute($console); $txt = $this->dumpExecute($console);
$this->assertFinished($txt, false, true); $this->assertFinished($txt, false, true);
$this->assertTrue($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.ini.php')); $this->assertTrue($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.config.php'));
} }
/** /**
@ -241,7 +243,7 @@ CONF;
$this->mockExistsTable('user', false, 1); $this->mockExistsTable('user', false, 1);
$this->mockUpdate([false, true, true], null, 1); $this->mockUpdate([false, true, true], null, 1);
$this->mockGetMarkupTemplate('local.ini.tpl', 'testTemplate', 1); $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(true), '', 1); $this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(true), '', 1);
$this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=admin@friendica.local')); $this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=admin@friendica.local'));
@ -267,7 +269,7 @@ CONF;
$this->mockExistsTable('user', false, 1); $this->mockExistsTable('user', false, 1);
$this->mockUpdate([false, true, true], null, 1); $this->mockUpdate([false, true, true], null, 1);
$this->mockGetMarkupTemplate('local.ini.tpl', 'testTemplate', 1); $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(false), '', 1); $this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(false), '', 1);
$this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=admin@friendica.local')); $this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=admin@friendica.local'));
@ -292,7 +294,7 @@ CONF;
$this->mockExistsTable('user', false, 1); $this->mockExistsTable('user', false, 1);
$this->mockUpdate([false, true, true], null, 1); $this->mockUpdate([false, true, true], null, 1);
$this->mockGetMarkupTemplate('local.ini.tpl', 'testTemplate', 1); $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(true), '', 1); $this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(true), '', 1);
$console = new AutomaticInstallation($this->consoleArgv); $console = new AutomaticInstallation($this->consoleArgv);
@ -326,7 +328,7 @@ CONF;
{ {
$this->mockConnect(false, 1); $this->mockConnect(false, 1);
$this->mockGetMarkupTemplate('local.ini.tpl', 'testTemplate', 1); $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(false), '', 1); $this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(false), '', 1);
$this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=admin@friendica.local')); $this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=admin@friendica.local'));
@ -350,7 +352,7 @@ Synopsis
bin/console autoinstall [-h|--help|-?] [-v] [-a] [-f] bin/console autoinstall [-h|--help|-?] [-v] [-a] [-f]
Description Description
Installs Friendica with data based on the local.ini.php file or environment variables Installs Friendica with data based on the local.config.php file or environment variables
Notes Notes
Not checking .htaccess/URL-Rewrite during CLI installation. Not checking .htaccess/URL-Rewrite during CLI installation.
@ -359,7 +361,7 @@ Options
-h|--help|-? Show help information -h|--help|-? Show help information
-v Show more debug information. -v Show more debug information.
-a All setup checks are required (except .htaccess) -a All setup checks are required (except .htaccess)
-f|--file <config> prepared config file (e.g. "config/local.ini.php" itself) which will override every other config option - except the environment variables) -f|--file <config> prepared config file (e.g. "config/local.config.php" itself) which will override every other config option - except the environment variables)
-s|--savedb Save the DB credentials to the file (if environment variables is used) -s|--savedb Save the DB credentials to the file (if environment variables is used)
-H|--dbhost <host> The host of the mysql/mariadb database (env MYSQL_HOST) -H|--dbhost <host> The host of the mysql/mariadb database (env MYSQL_HOST)
-p|--dbport <port> The port of the mysql/mariadb database (env MYSQL_PORT) -p|--dbport <port> The port of the mysql/mariadb database (env MYSQL_PORT)
@ -385,11 +387,11 @@ Environment variables
FRIENDICA_LANG The langauge of Friendica FRIENDICA_LANG The langauge of Friendica
Examples Examples
bin/console autoinstall -f 'input.ini.php bin/console autoinstall -f 'input.config.php
Installs Friendica with the prepared 'input.ini.php' file Installs Friendica with the prepared 'input.config.php' file
bin/console autoinstall --savedb bin/console autoinstall --savedb
Installs Friendica with environment variables and saves them to the 'config/local.ini.php' file Installs Friendica with environment variables and saves them to the 'config/local.config.php' file
bin/console autoinstall -h localhost -p 3365 -U user -P passwort1234 -d friendica bin/console autoinstall -h localhost -p 3365 -U user -P passwort1234 -d friendica
Installs Friendica with a local mysql database with credentials Installs Friendica with a local mysql database with credentials

View file

@ -139,7 +139,7 @@ Description
Sets the value of the provided key in the category Sets the value of the provided key in the category
Notes: Notes:
Setting config entries which are manually set in config/local.ini.php may result in Setting config entries which are manually set in config/local.config.php may result in
conflict between database settings and the manual startup settings. conflict between database settings and the manual startup settings.
Options Options

View file

@ -195,14 +195,14 @@ class InstallerTest extends MockedTest
*/ */
public function testCheckLocalIni() public function testCheckLocalIni()
{ {
$this->assertTrue($this->root->hasChild('config/local.ini.php')); $this->assertTrue($this->root->hasChild('config/local.config.php'));
$install = new Installer(); $install = new Installer();
$this->assertTrue($install->checkLocalIni()); $this->assertTrue($install->checkLocalIni());
$this->delConfigFile('local.ini.php'); $this->delConfigFile('local.config.php');
$this->assertFalse($this->root->hasChild('config/local.ini.php')); $this->assertFalse($this->root->hasChild('config/local.config.php'));
$install = new Installer(); $install = new Installer();
$this->assertTrue($install->checkLocalIni()); $this->assertTrue($install->checkLocalIni());

View file

@ -21,7 +21,7 @@ require_once 'include/dba.php';
* This function is responsible for doing post update changes to the data * This function is responsible for doing post update changes to the data
* (not the structure) in the database. * (not the structure) in the database.
* *
* Database structure changes are done in config/dbstructure.php * Database structure changes are done in config/dbstructure.config.php
* *
* If there is a need for a post process to a structure change, update this file * If there is a need for a post process to a structure change, update this file
* by adding a new function at the end with the number of the new DB_UPDATE_VERSION. * by adding a new function at the end with the number of the new DB_UPDATE_VERSION.
@ -33,7 +33,7 @@ require_once 'include/dba.php';
* *
* 1. Create a function "update_4712()" here in the update.php * 1. Create a function "update_4712()" here in the update.php
* 2. Apply the needed structural changes in config/dbStructure.php * 2. Apply the needed structural changes in config/dbStructure.php
* 3. Set DB_UPDATE_VERSION in config/dbstructure.php to 4712. * 3. Set DB_UPDATE_VERSION in config/dbstructure.config.php to 4712.
* *
* If you need to run a script before the database update, name the function "pre_update_4712()" * If you need to run a script before the database update, name the function "pre_update_4712()"
*/ */

View file

@ -0,0 +1,41 @@
<?php
// Local configuration
/* If automatic system installation fails:
*
* Copy this file to local.config.php
*
* Why local.config.php? Because it contains sensitive information which could
* give somebody complete control of your database. Apache's default
* configuration will interpret any .php file as a script and won't show the values
*
* Then set the following for your MySQL installation
*/
return [
'database' => [
'hostname' => 'localhost',
'username' => 'mysqlusername',
'password' => 'mysqlpassword',
'database' => 'mysqldatabasename',
'charset' => 'utf8mb4',
],
// ****************************************************************
// The configuration below will be overruled by the admin panel.
// Changes made below will only have an effect if the database does
// not contain any configuration for the friendica system.
// ****************************************************************
'config' => [
'admin_email' => 'admin@friendica.local',
'sitename' => 'Friendica Social Network',
'register_policy' => REGISTER_OPEN,
'register_text' => '',
],
'system' => [
'default_timezone' => 'UTC',
'language' => 'en',
],
];

View file

@ -1,41 +0,0 @@
<?php return <<<INI
; If automatic system installation fails:
; Copy this file to local.ini.php
; Why local.ini.php? Because it contains sensitive information which could
; give somebody complete control of your database. Apache's default
; configuration will interpret any .php file as a script and won't show the values
; Then set the following for your MySQL installation
[database]
hostname = localhost
username = friendica
password = friendica
database = friendica
charset = utf8mb4
; ****************************************************************
; The configuration below will be overruled by the admin panel.
; Changes made below will only have an effect if the database does
; not contain any configuration for the friendica system.
; ****************************************************************
[config]
admin_email = admin@friendica.local
sitename = Friendica Social Network
register_policy = REGISTER_OPEN
register_text =
[system]
default_timezone = UTC
language = en
INI;
// Keep this line

View file

@ -0,0 +1,35 @@
<?php
// Local configuration
// If you're unsure about what any of the config keys below do, please check the config/defaults.config.php for detailed
// documentation of their data type and behavior.
return [
'database' => [
'hostname' => '{{$dbhost}}',
'username' => '{{$dbuser}}',
'password' => '{{$dbpass}}',
'database' => '{{$dbdata}}',
'charset' => 'utf8mb4',
],
// ****************************************************************
// The configuration below will be overruled by the admin panel.
// Changes made below will only have an effect if the database does
// not contain any configuration for the friendica system.
// ****************************************************************
'config' => [
'php_path' => '{{$phpath}}',
'admin_email' => '{{$adminmail}}',
'sitename' => 'Friendica Social Network',
'register_policy' => REGISTER_OPEN,
'max_import_size' => 200000,
],
'system' => [
'urlpath' => '{{$urlpath}}',
'default_timezone' => '{{$timezone}}',
'language' => '{{$language}}',
],
];

View file

@ -1,56 +0,0 @@
<?php return <<<INI
; If you're unsure about what any of the config keys below do, please check the config/defaults.ini.php for detailed
; documentation of their data type and behavior.
[database]
hostname = "{{$dbhost}}"
username = "{{$dbuser}}"
password = "{{$dbpass}}"
database = "{{$dbdata}}"
charset = utf8mb4
; ****************************************************************
; Some config values below can be overruled from the admin settings
; ****************************************************************
[config]
php_path = "{{$phpath}}"
admin_email = "{{$adminmail}}"
sitename = Friendica Social Network
register_policy = REGISTER_OPEN
register_text =
max_import_size = 200000
[system]
urlpath = "{{$urlpath}}"
default_timezone = "{{$timezone}}"
language = "{{$language}}"
allowed_themes = vier,quattro,duepuntozero,smoothly,frio
theme = vier
allowed_link_protocols[0] = ftp
allowed_link_protocols[1] = ftps
allowed_link_protocols[2] = mailto
allowed_link_protocols[3] = cid
allowed_link_protocols[4] = gopher
maximagesize = 800000
no_regfullname = true
block_local_dir = false
directory = https://dir.friendica.social
auth_cookie_lifetime = 7
INI;
// Keep this line