4 We've tried very hard to ensure that Friendika will run on commodity hosting
5 platforms - such as those used to host Wordpress blogs and Drupal websites.
6 But be aware that Friendika is more than a simple web application. It is a
7 complex communications system which more closely resembles an email server
8 than a web server. For reliability and performance, messages are delivered in
9 the background and are queued for later delivery when sites are down. This
10 kind of functionality requires a bit more of the host system than the typical
11 blog. Not every PHP/MySQL hosting provider will be able to support Friendika.
12 Many will. But please review the requirements and confirm these with your
13 hosting provider prior to installation.
15 Before you begin: Choose a domain name or subdomain name for your server.
16 Put some thought into this - because changing it is currently not-supported.
17 Things will break, and some of your friends may have difficulty communicating
18 with you. We plan to address this limitation in a future release. Also decide
19 if you wish to connect with members of the Diaspora network, as this will
20 impact the installation requirements.
22 Decide if you will use SSL and obtain an SSL cert. Communications with the
23 Diaspora network MAY require both SSL AND an SSL cert signed by a CA which is
24 recognised by the major browsers. Friendika will work with self-signed certs
25 but Diaspora communication may not. For best results, install your cert PRIOR
26 to installing Friendika and when visiting your site for the initial
27 installation in step 5, please use the https: link. (Use the http: or non-SSL
28 link if your cert is self-signed).
32 - Apache with mod-rewrite enabled and "Options All" so you can use a
35 - PHP 5.2+. The later the better. PHP 5.3 is required for communications
36 with the Diaspora network and improved security.
38 - PHP *command line* access with register_argc_argv set to true in the
39 php.ini file [or see 'poormancron' in section 8]
41 - curl, gd (with at least jpeg support), mysql, mbstring, mcrypt, and openssl extensions
43 - some form of email server or email gateway such that PHP mail() works
47 - ability to schedule jobs with cron (Linux/Mac) or Scheduled Tasks
48 (Windows) [Note: other options are presented in Section 8 of this document]
50 - Installation into a top-level domain or sub-domain (without a
51 directory/path component in the URL) is preferred. This is REQUIRED if
52 you wish to communicate with the Diaspora network.
54 2. Unpack the Friendika files into the root of your web server document area.
56 - If you copy the directory tree to your webserver, make sure
57 that you also copy .htaccess - as "dot" files are often hidden
58 and aren't normally copied.
60 3. Create an empty database and note the access details (hostname, username,
61 password, database name).
64 4. If you know in advance that it will be impossible for the web server to
65 write or create files in your web directory, create an empty file called
66 .htconfig.php and make it writable by the web server.
68 5. Visit your website with a web browser and follow the instructions. Please
69 note any error messages and correct these before continuing. If you are using
70 SSL with a known signature authority (recommended), use the https: link to your
71 website. If you are using a self-signed cert or no cert, use the http: link.
73 6. *If* the automated installation fails for any reason, check the following:
75 - ".htconfig.php" exists
76 If not, edit htconfig.php and change system settings. Rename
78 - Database is populated.
79 If not, import the contents of "database.sql" with phpmyadmin
82 7. At this point visit your website again, and register your personal account.
83 Registration errors should all be recoverable automatically.
84 If you get any *critical* failure at this point, it generally indicates the
85 database was not installed correctly. You might wish to move/rename
86 .htconfig.php to another name and empty (called 'dropping') the database
87 tables, so that you can start fresh.
89 ****************************************************************************
90 ****************************************************************************
91 ******** THIS NEXT STEP IS IMPORTANT!!!! ***********
92 ****************************************************************************
93 ****************************************************************************
95 8. Set up a cron job or scheduled task to run the poller once every 5-10
96 minutes to pick up the recent "public" postings of your friends. Example:
98 cd /base/directory; /path/to/php include/poller.php
100 Change "/base/directory", and "/path/to/php" as appropriate for your situation.
102 If you are using a Linux server, run "crontab -e" and add a line like the
103 one shown, substituting for your unique paths and settings:
105 */10 * * * * cd /home/myname/mywebsite; /usr/bin/php include/poller.php
107 You can generally find the location of PHP by executing "which php". If you
108 have troubles with this section please contact your hosting provider for
109 assistance. Friendika will not work correctly if you cannot perform this step.
111 You should also be sure that $a->config['php_path'] is set correctly, it should
112 look like (changing it to the correct PHP location)
114 $a->config['php_path'] = '/usr/local/php53/bin/php'
116 Alternative: You may be able to use the 'poormancron' plugin to perform this
117 step if you are using a recent Friendika release. 'poormancron' may result in
118 perfomance and memory issues and is only suitable for small sites with one or
119 two users and a handful of contacts. To do this, edit the file
120 ".htconfig.php" and look for a line describing your plugins. On a fresh
121 installation, it will look like
123 $a->config['system']['addon'] = 'js_upload';
125 This indicates the "js_upload" addon module is enabled. You may add additional
126 addons/plugins using this same line in the configuration file. Change it to
129 $a->config['system']['addon'] = 'js_upload,poormancron';
131 and save your changes.
135 #####################################################################
137 If things don't work...
139 #####################################################################
142 #####################################################################
143 - If you get the message
144 "System is currently unavailable. Please try again later"
145 #####################################################################
147 Check your database settings. It usually means your database could not
148 be opened or accessed. If the database resides on the same machine, check that
149 the database server name is "localhost".
151 #####################################################################
153 #####################################################################
155 This could be the result of one of our Apache directives not being
156 supported by your version of Apache. Examine your apache server logs.
157 You might remove the line "Options -Indexes" from the .htaccess file if
158 you are using a Windows server as this has been known to cause problems.
159 Also check your file permissions. Your website and all contents must generally
162 It is likely that your web server reported the source of the problem in
163 its error log files. Please review these system error logs to determine what
164 caused the problem. Often this will need to be resolved with your hosting
165 provider or (if self-hosted) your web server configuration.
167 #####################################################################
168 - 400 and 4xx "File not found" errors
169 #####################################################################
171 First check your file permissions. Your website and all contents must
172 generally be world-readable.
174 Ensure that mod-rewite is installed and working, and that your
175 .htaccess file is being used. To verify the latter, create a file test.out
176 containing the word "test" in the top directory of Friendika, make it world
177 readable and point your web browser to
179 http://yoursitenamehere.com/test.out
181 This file should be blocked. You should get a permission denied message.
183 If you see the word "test" your Apache configuration is not allowing
184 your .htaccess file to be used (there are rules in this file to block access
185 to any file with .out at the end, as these are typically used for system logs).
187 Make certain the .htaccess file exists and is readable by everybody, then
188 look for the existence of "AllowOverride None" in the Apache server
189 configuration for your site. This will need to be changed to
192 If you do not see the word "test", your .htaccess is working, but it is
193 likely that mod-rewrite is not installed in your web server or is not working.
195 On most flavour of Linux,
198 % /etc/init.d/apache2 restart
200 Consult your hosting provider, experts on your particular Linux
201 distribution or (if Windows) the provider of your Apache server software if
202 you need to change either of these and can not figure out how. There is
203 a lot of help available on the web. Google "mod-rewrite" along with the
204 name of your operating system distribution or Apache package (if using
208 #####################################################################
209 - If you are unable to write the file .htconfig.php during installation
210 due to permissions issues:
211 #####################################################################
213 create an empty file with that name and give it world-write permission.
216 % touch .htconfig.php
217 % chmod 777 .htconfig.php
219 Retry the installation. As soon as the database has been created,
221 ******* this is important *********
223 % chmod 755 .htconfig.php