FOR ARCHIVAL PURPOSES ONLY

The information in this wiki hasn't been maintained for a good while. Some of the projects described have since been deprecated.

In particular, the "Ushahidi Platform v3.x" section contains information that is often misleading. Many details about this version of Platform have changed since.

This website is an extraction of the original Ushahidi wiki into a static form. Because of that, functions like logging in, commenting or searching will not work.

For more documentation, please refer to https://docs.ushahidi.com

Skip to end of metadata
Go to start of metadata

NOTE: Before proceeding with this section, ensure your environment meets the system requirements

Get the code from GitHub

Get a copy of the latest (stable) code from our v1.0 tree on GitHub Repository using the following steps:

  1. Create a SwiftRiver directory for the project and set up the necessary Git files

  2. Checkout v1.0 of the application

These steps will pull in the code for the v1.0 tree into a newly created SwiftRiver directory. Copy this directory to your web server's document root or public_html directory.

Create application directories

Create following directories and ensure they are writable:

Create configuration files

Create a .php for each of the .php.template files in your application/config directory. This can be done via the command line as follows:

Alternatively, you can use the following one-liner:

Create the database

Log in to your MySQL server (via the command line) as follows:

MySQL will prompt you for the password associated with <username>. Once logged in, run the following command at the MySQL prompt to create the database that shall host the data for your SwiftRiver installation.

Where <swiftriver-database> is the name of your SwiftRiver database.
NOTE: <username> should be an account that has privileges to create a database on your MySQL server.

Next, run the following command (also at the MySQL prompt):

Where:

  • <swiftriver-database> is the name of your SwiftRiver database
  • <swiftriver-user> is the username to use when connecting to your SwiftRiver database
  • <swiftriver-user-password> is the password associated with the user account to be used for connecting to your SwiftRiver database

Run the database schema setup script

The schema setup script is located at /path/to/SwiftRiver/install/sql/swiftriver.sql

NOTE: If you get the following error,

it's because MySQL gets paranoid when you attempt to create a function that is not deterministic and/or attempts to modify data. See http://dev.mysql.com/doc/refman/5.5/en/stored-programs-logging.html for a more detailed explanation. To circumvent this restriction, set the log_bin_trust_function_creators system variable to 1. You can do this from the MySQL prompt as follows:

Update the database configuration

Update your database configuration file (application/config/database.php) with the values you used for the swiftriver- parameters in the preceding steps.
The updated database configuration should read as follows:

Configuring Background Jobs

Content Crawling and Post Processing

Add the following entries to your crontab to schedule content crawling every 30 minutes and post processing (semantic tagging, media extraction etc) every 15 minutes respectively:

River Expirty

River maintenance involves checking which rivers have expired and are about to expire and sending out notifications to their owners. To schedule maintenance to run every day at midnight, add the following entries to your crontab:

Note: You may want to add cron jobs using the following command so that any files created by the cron jobs are writeable by the Apache user:

Additional Configuration

Apache Configuration

SwiftRiver's is bundled with a configuration file (.htaccess) that is used to enable enable URL rewriting on an Apache Webserver. The objective of the URL rewrite is to produce clean URLs. In order for Apache to honor the directives in the .htaccess, you need to modify the AllowOverride directive in <Directory> section for your document root so that it reads as follows:

For more information on this directive, click here

Modify .htaccess and bootstrap.php

By default, the first few sections of the SwiftRiver .htaccess file reads as follows:

This is based on the premise that, the deployment URL is of the form http://www.swiftriver-deployment.com. However, if you are running the application on your local machine, chances are that the deployment URL shall be something like http://localhost/swiftriver. Therefore, you will need to modify the RewriteBase in the .htaccess so that the file (.htaccess) reads as follows:

The next step is to edit boostrap.php - /path/to/swiftriver-root/application/bootstrap.php and modify the section that reads:

to:

Cookie configuration

The cookie configuration file, cookie.php - /path/to/swiftriver-root/application/config/cookie.php, specifies the following:

  • The domain the cookie is available to
  • Whether to only serve cookies over secure connections
  • Magic salt to add to the cookie - IMPORTANT!!: As a security precaution, it is advisable that you change the default value
  • No. of seconds before cookie expires; default is 0 meaning that the cookie expires when the browser is closed.

By default, cookie.php reads as follows:

NOTE: If you are serving your SwiftRiver installation via localhost (e.g.http://localhost/swiftriver), the domain parameter should be blank otherwise the application's CSRF protection mechanism shall prevent you from logging in and performing subsequent operations.

Accessing your SwiftRiver Installation

Point your browser to the URL of your SwiftRiver installation. At the login prompt, use admin and password for the username and password respectively.

IMPORTANT!! Change the default password after the initial login

If you get the following error:

it's because you haven't specified the timezone in your PHP configuration file - php.ini. Simply open your php.ini file for editing and look for the line with the following:

This is the configuration directive for the timezone used by all date/time functions. By default, SwiftRiver uses UTC for all date/time functions. Therefore, this line should read:

Once set, restart Apache in order for the changes to take effect.