]> git.mxchange.org Git - friendica.git/blob - doc/Settings.md
7d909afa093a51d06037e0286b2993d3507c0313
[friendica.git] / doc / Settings.md
1 Settings
2 ===
3 Here are some of the built-in features which don't have an exposed interface or are otherwise undocumented.
4 Configuration settings are stored in the file ".htconfig.php".
5 Edit this file with a text editor to make the desired changes.
6 Several system settings are already documented in that file and will not be covered here. 
7
8 Hot Keys
9 ---
10
11 Friendica traps the following keyboard events:
12
13 * [Pause] - Pauses "Ajax" update activity. This is the process that provides updates without reloading the page. You may wish to pause it to reduce network usage and/or as a debugging aid for javascript developers. A pause indicator will appear at the lower right hand corner of the page. Hit the [pause] key once again to resume.
14
15 Birthday Notifications
16 ---
17
18 Birthday events are published on your Home page for any friends having a birthday in the coming 6 days.
19 In order for your birthday to be discoverable by all of your friends, you must set your birthday (at least the month and day) in your default profile.
20 You are not required to provide the year.
21
22 System settings
23 ---
24
25 **Settings should be done in the admin panel** (/admin).
26 Those settings found in the database, will always override the settings added to the ``.htconfig.php`` file.
27
28 ###Language
29
30 Please see util/README for information on creating language translations.
31
32 Config:
33
34         $a->config['system']['language'] = 'name';
35
36 ###System Theme
37
38 Choose a theme to be the default system theme. This can be over-ridden by user profiles.
39 Default theme is "default".
40
41 Config:
42
43         $a->config['system']['theme'] = 'theme-name';
44
45 ###Proxy Configuration Settings
46
47 If your site uses a proxy to connect to the internet, you may use these settings to communicate with the outside world.
48 The outside world still needs to be able to see your website, or this will not be very useful.
49
50 Config:
51
52         $a->config['system']['proxy'] = "http://proxyserver.domain:port";
53         $a->config['system']['proxyuser'] = "username:password";
54
55 ###Network Timeout
56
57 How long to wait on a network communication before timing out.
58 Value is in seconds.
59 Default is 60 seconds.
60 Set to 0 for unlimited (not recommended).
61
62 Config:
63
64         $a->config['system']['curl_timeout'] = 60;
65
66 ###Banner/Logo
67
68 Set the content for the site banner.
69 The default logo is the Friendica logo and name.
70 You may wish to provide HTML/CSS to style and/or position this content, as it may not be themed by default. 
71
72 Config:
73
74         $a->config['system']['banner'] = '<span id="logo-text">My Great Website</span>';
75
76 ###Maximum Image Size
77
78 Maximum size in bytes of uploaded images.
79 The default is set to 0, which means no limits.
80
81 Config:
82
83         $a->config['system']['maximagesize'] = 1000000;
84
85 ###UTF-8 Regular Expressions
86
87 During registrations, full names are checked using UTF-8 regular expressions.
88 This requires PHP to have been compiled with a special setting to allow UTF-8 expressions.
89 If you are completely unable to register accounts, set no_utf to true.
90 The default is set to false (meaning UTF8 regular expressions are supported and working).
91  
92 Config:
93
94         $a->config['system']['no_utf'] = true;
95
96 ###Check Full Names
97
98 You may find a lot of spammers trying to register on your site.
99 During testing we discovered that since these registrations were automatic, the "Full Name" field was often set to just an account name with no space between first and last name.
100 If you would like to support people with only one name as their full name, you may change this setting to true.
101 Default is false.
102  
103 Config:
104
105         $a->config['system']['no_regfullname'] = true;
106
107 ###OpenID
108
109 By default, OpenID may be used for both registration and logins.
110 If you do not wish to make OpenID facilities available on your system (at all), set 'no_openid' to true.
111 Default is false.
112
113 Config:
114
115         $a->config['system']['no_openid'] = true;
116
117 ###Multiple Registrations
118
119 The ability to create "Pages" requires a person to register more than once.
120 Your site configuration can block registration (or require approval to register).
121 By default, logged in users can register additional accounts for use as pages.
122 These will still require approval if REGISTER_APPROVE is selected.
123 You may prohibit logged in users from creating additional accounts by setting 'block_extended_register' to true.
124 Default is false.
125  
126 Config:
127
128         $a->config['system']['block_extended_register'] = true;
129
130 Security settings
131 ---
132
133 ###Verify SSL Certitificates
134
135 By default Friendica allows SSL communication between websites that have "self-signed" SSL certificates.
136 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.
137 SSL encrypts all the data transmitted between sites (and to your browser). This allows you to have completely encrypted communications, and also protect your login session from hijacking.
138 Self-signed certificates can be generated for free, without paying top-dollar for a website SSL certificate. 
139 However these aren't looked upon favourably in the security community because they can be subject to so-called "man-in-the-middle" attacks.
140 If you wish, you can turn on strict certificate checking.
141 This will mean you cannot connect (at all) to self-signed SSL sites.
142
143 Config:
144
145         $a->config['system']['verifyssl'] = true;
146
147 Corporate/Edu enhancements
148 ---
149
150 ###Allowed Friend Domains
151
152 Comma separated list of domains which are allowed to establish friendships with this site.
153 Wildcards are accepted.
154 (Wildcard support on Windows platforms requires PHP5.3).
155 By default, any (valid) domain may establish friendships with this site.
156
157 Config:
158
159         $a->config['system']['allowed_sites'] = "sitea.com, *siteb.com";
160
161 ###Allowed Email Domains
162
163 Comma separated list of domains which are allowed in email addresses for registrations to this site.
164 This can lockout those who are not part of this organisation from registering here.
165 Wildcards are accepted.
166 (Wildcard support on Windows platforms requires PHP5.3).
167 By default, any (valid) email address is allowed in registrations.  
168
169 Config:
170
171         $a->config['system']['allowed_email'] = "sitea.com, *siteb.com";
172
173 ###Block Public
174
175 Set to true to block public access to all otherwise public personal pages on this site unless you are currently logged in.
176 This blocks the viewing of profiles, friends, photos, the site directory and search pages to unauthorised persons.
177 A side effect is that entries from this site will not appear in the global directory.
178 We recommend specifically disabling that also (setting is described elsewhere on this page).
179 Note: this is specifically for sites that desire to be "standalone" and do not wish to be connected to any other Friendica sites.
180 Unauthorised persons will also not be able to request friendship with site members.
181 Default is false.
182 Available in version 2.2 or greater.
183  
184 Config:
185
186         $a->config['system']['block_public'] = true;
187
188 ###Force Publish
189
190 By default, each user can choose on their Settings page whether or not to have their profile published in the site directory.
191 This setting forces all profiles on this site to be listed in the site directory and there is no option provided to the user to change it.
192 Default is false.
193  
194 Config:
195
196         $a->config['system']['publish_all'] = true;
197
198 ###Global Directory
199
200 This configures the URL to update the global directory, and is supplied in the default configuration.
201 The undocumented part is that if this is not set, the global directory is completely unavailable to the application.
202 This allows a private community to be completely isolated from the global network. 
203
204         $a->config['system']['directory'] = 'http://dir.friendi.ca';
205
206 Developer Settings
207 ---
208
209 ### Debugging
210 Most useful when debugging protocol exchanges and tracking down other communications issues. 
211
212 Config:
213
214         $a->config['system']['debugging'] = true;
215         $a->config['system']['logfile'] = 'logfile.out';
216         $a->config['system']['loglevel'] = LOGGER_DEBUG;
217
218 Turns on detailed debugging logs which will be stored in 'logfile.out' (which must be writeable by the webserver).
219 LOGGER_DEBUG will show a good deal of information about system activity but will not include detailed data.
220 You may also select LOGGER_ALL but due to the volume of information we recommend only enabling this when you are tracking down a specific problem.
221 Other log levels are possible but are not being used at the present time. 
222
223 Please be aware that turning on the logging can fill up the disk space on your server relatively quick.
224 You should take preventions with e.g. [logrotate](https://en.wikipedia.org/wiki/Log_rotation) or similar tools.
225
226 ###PHP error logging
227
228 Use the following settings to redirect PHP errors to a file. 
229
230 Config:
231
232         error_reporting(E_ERROR | E_WARNING | E_PARSE );
233         ini_set('error_log','php.out');
234         ini_set('log_errors','1');
235         ini_set('display_errors', '0');
236
237 This will put all PHP errors in the file php.out (which must be writeable by the webserver).
238 Undeclared variables are occasionally referenced in the program and therefore we do not recommend using E_NOTICE or E_ALL.
239 The vast majority of issues reported at these levels are completely harmless.
240 Please report to the developers any errors you encounter in the logs using the recommended settings above.
241 They generally indicate issues which need to be resolved. 
242
243 If you encounter a blank (white) page when using the application, view the PHP logs - as this almost always indicates an error has occurred.
244
245 *Note*: PHP logging cannot be activated from the admin panel but has to be configured from the ``.htconfig.php`` file.