]> git.mxchange.org Git - friendica.git/blob - htconfig.php
Use MYSQL_* environment variables for tests
[friendica.git] / htconfig.php
1 <?php
2
3 // If automatic system installation fails:
4
5
6 die('The configuration you did manually contains some mistakes. Please have a look at your .htconfig.php file.');
7 // If you are doing the configuration manually, please remove the line above
8
9
10 // Copy or rename this file to .htconfig.php
11
12 // Why .htconfig.php? Because it contains sensitive information which could
13 // give somebody complete control of your database. Apache's default
14 // configuration denies access to and refuses to serve any file beginning
15 // with .ht
16
17 // Then set the following for your MySQL installation
18
19 $db_host = 'your.mysqlhost.com';
20 $db_user = 'mysqlusername';
21 $db_pass = 'mysqlpassword';
22 $db_data = 'mysqldatabasename';
23
24 // Use environment variables for mysql if they are set beforehand
25 if (!empty(getenv('MYSQL_HOST'))
26         && (!empty(getenv('MYSQL_USERNAME')) || !empty(getenv('MYSQL_USER')))
27         && !getenv('MYSQL_PASSWORD') === false
28         && !empty(getenv('MYSQL_DATABASE'))) {
29         $db_host = getenv('MYSQL_HOST');
30         if (!empty(getenv('MYSQL_PORT'))) {
31                 $db_host .= ':' . getenv('MYSQL_PORT');
32         }
33         if (!empty(getenv('MYSQL_USERNAME'))) {
34                 $db_user = getenv('MYSQL_USERNAME');
35         } else {
36                 $db_user = getenv('MYSQL_USER');
37         }
38         $db_pass = (string) getenv('MYSQL_PASSWORD');
39         $db_data = getenv('MYSQL_DATABASE');
40 }
41
42 // Set the database connection charset to full Unicode (utf8mb4).
43 // Changing this value will likely corrupt the special characters.
44 // You have been warned.
45 $a->config['system']['db_charset'] = "utf8mb4";
46
47 // Choose a legal default timezone. If you are unsure, use "America/Los_Angeles".
48 // It can be changed later and only applies to timestamps for anonymous viewers.
49
50 $default_timezone = 'America/Los_Angeles';
51
52 // Default system language
53
54 $a->config['system']['language'] = 'en';
55
56 // What is your site name?
57
58 $a->config['sitename'] = "Friendica Social Network";
59
60 // Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
61 // Be certain to create your own personal account before setting
62 // REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on
63 // the registration page. REGISTER_APPROVE requires you set 'admin_email'
64 // to the email address of an already registered person who can authorise
65 // and/or approve/deny the request.
66
67 // In order to perform system administration via the admin panel, admin_email
68 // must precisely match the email address of the person logged in.
69
70 $a->config['register_policy'] = REGISTER_OPEN;
71 $a->config['register_text'] = '';
72 $a->config['admin_email'] = '';
73
74 // Maximum size of an imported message, 0 is unlimited
75
76 $a->config['max_import_size'] = 200000;
77
78 // maximum size of uploaded photos
79
80 $a->config['system']['maximagesize'] = 800000;
81
82 // Location of PHP command line processor
83
84 $a->config['php_path'] = 'php';
85
86 // Server-to-server private message encryption (RINO) is allowed by default.
87 // set to 0 to disable, 1 to enable
88
89 $a->config['system']['rino_encrypt'] = 1;
90
91 // allowed themes (change this from admin panel after installation)
92
93 $a->config['system']['allowed_themes'] = 'quattro,vier,duepuntozero,smoothly';
94
95 // default system theme
96
97 $a->config['system']['theme'] = 'vier';
98
99
100 // By default allow pseudonyms
101
102 $a->config['system']['no_regfullname'] = true;
103
104 //Deny public access to the local directory
105 //$a->config['system']['block_local_dir'] = false;
106
107 // Location of the global directory
108 $a->config['system']['directory'] = 'https://dir.friendica.social';
109
110 // Allowed protocols in link URLs; HTTP protocols always are accepted
111 $a->config['system']['allowed_link_protocols'] = ['ftp', 'ftps', 'mailto', 'cid', 'gopher'];
112
113 // Authentication cookie lifetime, in days
114 $a->config['system']['auth_cookie_lifetime'] = 7;