Add new INI config files
- Add new local.ini.tpl template - Change all references from .htconfig.php to config/local.ini.php
This commit is contained in:
parent
7c17d2026f
commit
2503660f97
30
INSTALL.txt
30
INSTALL.txt
|
@ -106,8 +106,8 @@ password, database name).
|
|||
- Please check the additional notes if running on MySQ 5.7.17 or newer
|
||||
|
||||
4. If you know in advance that it will be impossible for the web server to
|
||||
write or create files in your web directory, create an empty file called
|
||||
.htconfig.php and make it writable by the web server.
|
||||
write or create files in the /config/ subfolder, create an empty file called
|
||||
local.ini.php and make it writable by the web server.
|
||||
|
||||
5. Visit your website with a web browser and follow the instructions. Please
|
||||
note any error messages and correct these before continuing.
|
||||
|
@ -121,9 +121,9 @@ so in the host name setting for the database.
|
|||
|
||||
6. *If* the automated installation fails for any reason, check the following:
|
||||
|
||||
- ".htconfig.php" exists
|
||||
If not, edit htconfig.php and change system settings. Rename
|
||||
to .htconfig.php
|
||||
- "config/local.ini.php" exists
|
||||
If not, edit local-sample.ini.php and change system settings. Rename
|
||||
to local.ini.php
|
||||
- Database is populated.
|
||||
If not, import the contents of "database.sql" with phpmyadmin
|
||||
or mysql command line
|
||||
|
@ -132,7 +132,7 @@ or mysql command line
|
|||
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. You might wish to move/rename
|
||||
.htconfig.php to another name and empty (called 'dropping') the database
|
||||
local.ini.php to another name and empty (called 'dropping') the database
|
||||
tables, so that you can start fresh.
|
||||
|
||||
****************************************************************************
|
||||
|
@ -177,7 +177,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
|
||||
Friendica node is done, you should make yoursef a backup plan.
|
||||
|
||||
The most important file is the `.htconfig.php` file in the base directory.
|
||||
The most important file is the `config/local.ini.php` file in the base directory.
|
||||
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.
|
||||
|
||||
|
@ -274,21 +274,21 @@ Windows).
|
|||
|
||||
|
||||
#####################################################################
|
||||
- If you are unable to write the file .htconfig.php during installation
|
||||
- If you are unable to write the file config/local.ini.php during installation
|
||||
due to permissions issues:
|
||||
#####################################################################
|
||||
|
||||
create an empty file with that name and give it world-write permission.
|
||||
For Linux:
|
||||
|
||||
% touch .htconfig.php
|
||||
% chmod 777 .htconfig.php
|
||||
% touch config/local.ini.php
|
||||
% chmod 777 config/local.ini.php
|
||||
|
||||
Retry the installation. As soon as the database has been created,
|
||||
|
||||
******* this is important *********
|
||||
|
||||
% chmod 755 .htconfig.php
|
||||
% chmod 755 config/local.ini.php
|
||||
|
||||
#####################################################################
|
||||
- Some configurations with "suhosin" security are configured without
|
||||
|
@ -327,11 +327,11 @@ 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
|
||||
are NOT called with -d suhosin.executor.func.blacklist=none.
|
||||
|
||||
So the simple solution is to put the correct parameters into .htconfig.php:
|
||||
// Location of PHP command line processor
|
||||
$a->config['php_path'] = '/usr/bin/php -d suhosin.executor.func.blacklist=none
|
||||
-d suhosin.executor.eval.blacklist=none';
|
||||
So the simple solution is to put the correct parameters into config/local.ini.php:
|
||||
|
||||
[config]
|
||||
; Location of PHP command line processor
|
||||
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
|
||||
execute php-scripts that also use proc_open, but it took me quite some time to
|
||||
|
|
13
boot.php
13
boot.php
|
@ -64,15 +64,13 @@ define('EOL', "<br />\r\n");
|
|||
* @brief Image storage quality.
|
||||
*
|
||||
* Lower numbers save space at cost of image detail.
|
||||
* For ease of upgrade, please do not change here. Change jpeg quality with
|
||||
* $a->config['system']['jpeg_quality'] = n;
|
||||
* in .htconfig.php, where n is netween 1 and 100, and with very poor results
|
||||
* below about 50
|
||||
* For ease of upgrade, please do not change here. Set [system] jpegquality = n in config/local.ini.php,
|
||||
* where n is between 1 and 100, and with very poor results below about 50
|
||||
*/
|
||||
define('JPEG_QUALITY', 100);
|
||||
|
||||
/**
|
||||
* $a->config['system']['png_quality'] from 0 (uncompressed) to 9
|
||||
* [system] png_quality = n where is between 0 (uncompressed) to 9
|
||||
*/
|
||||
define('PNG_QUALITY', 8);
|
||||
|
||||
|
@ -83,9 +81,10 @@ define('PNG_QUALITY', 8);
|
|||
* this length (on the longest side, the other side will be scaled appropriately).
|
||||
* Modify this value using
|
||||
*
|
||||
* $a->config['system']['max_image_length'] = n;
|
||||
* [system]
|
||||
* max_image_length = n;
|
||||
*
|
||||
* in .htconfig.php
|
||||
* in config/local.ini.php
|
||||
*
|
||||
* If you don't want to set a maximum length, set to -1. The default value is
|
||||
* defined by 'MAX_IMAGE_LENGTH' below.
|
||||
|
|
|
@ -0,0 +1,444 @@
|
|||
<?php return <<<INI
|
||||
|
||||
; This file declares the default values for all the config values of Friendica.
|
||||
; Please don't edit this file as its content may change in the upcoming versions.
|
||||
|
||||
[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 =
|
||||
|
||||
[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 (String)
|
||||
; In order to perform system administration via the admin panel, this must precisely match the email address of the person logged in.
|
||||
admin_email =
|
||||
|
||||
; 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
|
||||
|
||||
; 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 authorise
|
||||
; 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]
|
||||
; allowed_link_protocols (Array)
|
||||
; Allowed protocols in links URLs, add at your own risk. http is always allowed.
|
||||
allowed_link_protocols[] = ftp
|
||||
allowed_link_protocols[] = ftps
|
||||
allowed_link_protocols[] = mailto
|
||||
allowed_link_protocols[] = cid
|
||||
allowed_link_protocols[] = 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
|
||||
|
||||
; 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
|
||||
|
||||
; db_log (Path)
|
||||
; Name of a logfile to log slow database queries
|
||||
db_log =
|
||||
|
||||
; 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_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_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
|
||||
|
||||
; db_log_index_blacklist (Comma-separated list)
|
||||
; Blacklist of indexes that shouldn't be watched
|
||||
db_log_index_blacklist =
|
||||
|
||||
; dbclean_expire_conversation (Integer)
|
||||
; When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
|
||||
; These data are normally needed only for debugging purposes and they are safe to delete.
|
||||
dbclean_expire_conversation = 90
|
||||
|
||||
; 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
|
||||
|
||||
; 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
|
||||
|
||||
; dlogfile (Path)
|
||||
; location of the developer log file
|
||||
dlogfile =
|
||||
|
||||
; dlogip (String)
|
||||
; restricts develop log writes to requests originating from this IP address
|
||||
dlogip =
|
||||
|
||||
; frontend_worker_timeout (Integer)
|
||||
; Value in minutes after we think that a frontend task was killed by the webserver.
|
||||
frontend_worker_timeout = 10
|
||||
|
||||
; 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
|
||||
|
||||
; 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)
|
||||
; Default system language. Two-letters ISO 639-1 code.
|
||||
language = en
|
||||
|
||||
; 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_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_batch_queue (Integer)
|
||||
; Maximum number of batched queue items for a single contact before subsequent messages are discarded.
|
||||
max_batch_queue = 1000
|
||||
|
||||
; 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
|
||||
|
||||
; 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_regfullname (Boolean)
|
||||
; Allow pseudonyms (true) or enforce a space between firstname and lastname in Full name, as an antispam measure (false).
|
||||
no_regfullname = true
|
||||
|
||||
; session_handler (database|cache|native)
|
||||
; Whether to use Cache to store session data or to use PHP native session storage.
|
||||
session_handler = database
|
||||
|
||||
; cache_driver (database|memcache|memcached|redis)
|
||||
; Whether to use Memcache or Memcached or Redis to store temporary cache.
|
||||
cache_driver = database
|
||||
|
||||
; 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[] = 127.0.0.1, 11211
|
||||
|
||||
; 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
|
||||
|
||||
; 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
|
||||
|
||||
; pidfile (Path)
|
||||
; Daemon pid file path. For example: pidfile = /path/to/daemon.pid
|
||||
pidfile =
|
||||
|
||||
; 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 =
|
||||
|
||||
; 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
|
||||
|
||||
; free_crawls (Integer)
|
||||
; Number of "free" searches when "permit_crawling" is activated.
|
||||
free_crawls = 10
|
||||
|
||||
; 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
|
||||
|
||||
; queue_no_dead_check (Boolean)
|
||||
; Ignore if the target contact or server seems to be dead during queue delivery.
|
||||
queue_no_dead_check = false
|
||||
|
||||
; 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
|
||||
|
||||
; 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
|
||||
|
||||
; profiler (Boolean)
|
||||
; Enable internal timings to help optimize code. Needed for "rendertime" addon.
|
||||
profiler = false
|
||||
|
||||
; png_quality (Integer)
|
||||
; Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
|
||||
png_quality = 8
|
||||
|
||||
; proc_windows (Boolean)
|
||||
; Should be enabled if Friendica is running under Windows.
|
||||
proc_windows = 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
|
||||
|
||||
; 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_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
|
||||
|
||||
; 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
|
||||
|
||||
; allowed themes (Comma-separated list)
|
||||
; Themes users can change to in their settings
|
||||
allowed_themes = 'quattro,vier,duepuntozero,smoothly'
|
||||
|
||||
; theme (String)
|
||||
; System theme name
|
||||
theme = vier
|
||||
|
||||
; 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
|
||||
|
||||
; worker_cooldown (Integer)
|
||||
; Cooldown period in seconds after each worker function call.
|
||||
worker_cooldown = 0
|
||||
|
||||
; 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
|
||||
|
||||
; directory (String)
|
||||
; URL of the global directory
|
||||
directory = https://dir.friendi.social
|
||||
|
||||
; 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
|
||||
|
||||
INI;
|
||||
// Keep this line
|
|
@ -0,0 +1,41 @@
|
|||
<?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]
|
||||
host = localhost
|
||||
user = mysqlusername
|
||||
pass = mysqlpassword
|
||||
data = 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
|
|
@ -51,7 +51,7 @@ if (!$a->mode == App::MODE_INSTALL) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Load configs from db. Overwrite configs from .htconfig.php
|
||||
* Load configs from db. Overwrite configs from config/local.ini.php
|
||||
*/
|
||||
|
||||
Config::load();
|
||||
|
|
|
@ -2378,7 +2378,7 @@ function admin_page_logs(App $a)
|
|||
'$loglevel' => ['loglevel', L10n::t("Log level"), Config::get('system', 'loglevel'), "", $log_choices],
|
||||
'$form_security_token' => get_form_security_token("admin_logs"),
|
||||
'$phpheader' => L10n::t("PHP logging"),
|
||||
'$phphint' => L10n::t("To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."),
|
||||
'$phphint' => L10n::t("To temporarily enable logging of PHP errors and warnings you can prepend the following to the index.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."),
|
||||
'$phplogcode' => "error_reporting(E_ERROR | E_WARNING | E_PARSE);\nini_set('error_log','php.out');\nini_set('log_errors','1');\nini_set('display_errors', '1');",
|
||||
'$phplogenabled' => $phplogenabled,
|
||||
]);
|
||||
|
|
|
@ -245,7 +245,7 @@ function install_content(App $a) {
|
|||
|
||||
function manual_config(App $a) {
|
||||
$data = htmlentities($a->data['txt'],ENT_COMPAT, 'UTF-8');
|
||||
$o = L10n::t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.');
|
||||
$o = 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.');
|
||||
$o .= "<textarea rows=\"24\" cols=\"80\" >$data</textarea>";
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ class JITConfigAdapter extends BaseObject implements IConfigAdapter
|
|||
$this->in_db[$cat][$k] = true;
|
||||
return $value;
|
||||
} elseif (isset($a->config[$cat][$k])) {
|
||||
// Assign the value (mostly) from the .htconfig.php to the cache
|
||||
// Assign the value (mostly) from config/local.ini.php file to the cache
|
||||
$this->cache[$cat][$k] = $a->config[$cat][$k];
|
||||
$this->in_db[$cat][$k] = false;
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class Install extends BaseObject
|
|||
|
||||
/**
|
||||
* Executes the installation of Friendica in the given environment.
|
||||
* - Creates `.htconfig.php`
|
||||
* - Creates `config/local.ini.php`
|
||||
* - Installs Database Structure
|
||||
*
|
||||
* @param string $urlpath Path based on the URL of Friendica (e.g. '/friendica')
|
||||
|
@ -82,7 +82,7 @@ class Install extends BaseObject
|
|||
*/
|
||||
public static function install($urlpath, $dbhost, $dbuser, $dbpass, $dbdata, $phpath, $timezone, $language, $adminmail, $rino = 1)
|
||||
{
|
||||
$tpl = get_markup_template('htconfig.tpl');
|
||||
$tpl = get_markup_template('local.ini.tpl');
|
||||
$txt = replace_macros($tpl,[
|
||||
'$dbhost' => $dbhost,
|
||||
'$dbuser' => $dbuser,
|
||||
|
@ -96,7 +96,7 @@ class Install extends BaseObject
|
|||
'$rino' => $rino
|
||||
]);
|
||||
|
||||
$result = file_put_contents('.htconfig.php', $txt);
|
||||
$result = file_put_contents('config/local.ini.php', $txt);
|
||||
if (! $result) {
|
||||
self::getApp()->data['txt'] = $txt;
|
||||
}
|
||||
|
@ -303,9 +303,9 @@ class Install extends BaseObject
|
|||
}
|
||||
|
||||
/**
|
||||
* ".htconfig.php" - Check
|
||||
* "config/local.ini.php" - Check
|
||||
*
|
||||
* Checks if it's possible to create the ".htconfig.php"
|
||||
* Checks if it's possible to create the "config/local.ini.php"
|
||||
*
|
||||
* @param array $checks The list of all checks (by-ref parameter!)
|
||||
*/
|
||||
|
@ -313,17 +313,17 @@ class Install extends BaseObject
|
|||
{
|
||||
$status = true;
|
||||
$help = "";
|
||||
if ((file_exists('.htconfig.php') && !is_writable('.htconfig.php')) ||
|
||||
(!file_exists('.htconfig.php') && !is_writable('.'))) {
|
||||
if ((file_exists('config/local.ini.php') && !is_writable('config/local.ini.php')) ||
|
||||
(!file_exists('config/local.ini.php') && !is_writable('.'))) {
|
||||
|
||||
$status = false;
|
||||
$help = L10n::t('The web installer needs to be able to create a file called ".htconfig.php" in the top 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.ini.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('At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Friendica top folder.') . 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('You can alternatively skip this procedure and perform a manual installation. Please see the file "INSTALL.txt" for instructions.') . EOL;
|
||||
}
|
||||
|
||||
self::addCheck($checks, L10n::t('.htconfig.php is writable'), $status, false, $help);
|
||||
self::addCheck($checks, L10n::t('config/local.ini.php is writable'), $status, false, $help);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
<?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 = {{$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}}
|
||||
|
||||
rino_encrypt = {{$rino}}
|
||||
|
||||
allowed_themes = vier,quattro,duepuntozero,smoothly,frio
|
||||
theme = vier
|
||||
|
||||
allowed_link_protocols[] = ftp
|
||||
allowed_link_protocols[] = ftps
|
||||
allowed_link_protocols[] = mailto
|
||||
allowed_link_protocols[] = cid
|
||||
allowed_link_protocols[] = gopher
|
||||
|
||||
maximagesize = 800000
|
||||
|
||||
no_regfullname = true
|
||||
|
||||
block_local_dir = false
|
||||
|
||||
directory = https://dir.friendica.social
|
||||
|
||||
auth_cookie_lifetime = 7
|
||||
|
||||
INI;
|
||||
// Keep this line
|
Loading…
Reference in New Issue
Block a user