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 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.
The instructions below are for PHPMyAdmin. Database setup basically entails executing SQL scripts against a database.
- Select the database you want from the list on the left
- Select the SQL tab
[earthli]/sql/icon_themes.sql(once per database)
[earthli]/sql/shared_users.sql(once per database)
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.
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.
[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.
Installation is complete! You're ready to run your application for the first time.
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
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.
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
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';
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
statements that create the default 'root' and 'publisher' users.
Here you can change the root user name and password.