After you've made sure that your system meets the requirements, you're ready to install. If you have an existing installation, use the upgrade instructions instead.


The following instructions assume that you've downloaded the Albums application with the WebCore included. Simply substitute the name of the application you downloaded for 'albums' to set up other applications. If you downloaded the Suite, the instructions are pretty much the same, except you have to customize the settings for all four applications.

Extract Files

  1. Extract the zip archive to a location* on your website.

*Referred to as [earthli] throughout the rest of the manual

WebCore and application files will also be extracted here. See PHP library paths for help moving these files out of your document root.

If you're installing the WebCore Suite, you'll have to adjust the php include path in the .htaccess file. See PHP library paths for more information.

Configure the Database

The instructions below are for PHPMyAdmin. Database setup basically entails executing SQL scripts against a database.

  1. Select the database you want from the list on the left
  2. Select the SQL tab
  3. Import [earthli]/sql/icon_themes.sql (once per database)
  4. Import [earthli]/sql/shared_users.sql (once per database)
  5. Import [earthli]/sql/albums.sql

If you install to an existing database and there are table name conflicts, see non-standard table names for more information.

The scripts will create two WebCore users by default: 'root' and 'publisher'; see users and logins for information on changing their names and passwords.

Configure the Application

The earthli WebCore splits configuration into two areas: page/environment configuration and application configuration. All configuration files are found in the [earthli]/plugins/ folder and are PHP files. Most configuration is done at the page level — most deployments will use the defaults for appliation deployment. The primary configuration sections are:

  • Site name, copyright, logo and other identification.
  • File and path locations, domain name and configured URLs.
  • Email address and publishing configuration.
  • Database connection details.
  • Log filtering and storage.

See the [earthli]/plugins/com.earthli.webcore.init.php and [earthli]/plugins/com.earthli.albums.init.php files for more detailed instructions on configuration options.

Configure File Permissions

The server needs to be able to write files into the document root in order to upload files. In most installations, the upload folders are common/temp/uploads/ and the attachments folders. The easiest way to let the web server process write to these is to set the group to "www" (OS X) or "www-data" (Linux) or any group in which the server is a member. Make sure to give the group rights to write in that folder and all sub-folders. Windows machines are exempt as they usually have no default write restrictions on files in the document root.

Set permissions on Unix-style operating systems (Mac OS X, Linux, etc.) with the following commands:

chown -R your-user:www-data ./news/attachments
chmod -R 775 ./news/attachments

The -R applies the operation to the folder and all files and sub-folders.

Ready to Run!

Installation is complete! You're ready to run your application for the first time.

Advanced settings

PHP library paths

Each earthli application distribution has an .htaccess file. The first line sets the PHP include path. For simple applications, the default path is simply the current directory (.). If your library files are in folder other than the current directory, simply add that path here. PHP will find the required files in this path.

The WebCore suite, for example, has its entire library in a 'php' subfolder. If you installed to a folder called /webroot/suite, then your path should look like:

php_value include_path ".:/webroot/suite/php" (Linux)
php_value include_path ".;C:\webroot\suite\php" (Windows)

Note that Windows uses a semicolon separator and Linux uses a colon separator.

These instructions only work for Apache servers that have .htaccess files enabled. If you have another server or can't use .htaccess files, see your server manual for instructions on setting the PHP include path.

Non-standard table names

All of the sql files are sets of SQL commands that create tables in your selected database. If there is a naming conflict, simply search for the CREATE TABLE statement and change the name of the table.

Once you've created the database successfully, you'll have to update the application configuration file so that earthli looks for data in the renamed tables.

In the application's com.earthli.[app].init.php file, scroll to the bottom to find a comment block detailing how to change table names. For each table that you renamed (say 'album_folders' to 'earthli_album_folder'), make an entry like this:

$Result->table_names->folders = 'earthli_album_folders';

Find the exact property name for each table in the documentation. Most are documented in APPLICATION_TABLE_NAMES, but application-specific tables are documented with the application.

Users and logins

The shared_users.sql file is a set of SQL commands that creates the basic WebCore tables and objects. If you scroll to the end of the file, you'll find two INSERT statements that create the default 'root' and 'publisher' users.

Here you can change the root user name and password.

Keep the MD5 function around the password or you won't be able to log in.