LOVD v.3.0 INSTALLATION GUIDE
=============================

REQUIREMENTS
============
LOVD 3.0 requires a webserver (preferably Apache), PHP >= 5.3.0 with mbstring
enabled and libxml and openssl installed, and MySQL >= 4.1.2.


PREPARATIONS
============
To install LOVD, first copy and rename the standard config file
config.ini.php-lovd to config.ini.php and edit it in, for example, a basic text
editor. This is absolutely mandatory, because you will need to enter the MySQL
hostname, database name, username and password here.
Please go through the entire config.ini.php file to determine if you need to
change any of the other settings.


!!!NOTE!!!
==========
A .htaccess file is put in the root directory of your LOVD installation
protecting the config.ini.php file. This will prevent the config file from being
accessed by others on Apache HTTP servers (if configured properly), the most
commonly used webserver. If you use Apache, please check that your version and
configuration support this feature. Make sure you have the .htaccess file into
your LOVD directory, on Unix and Linux systems it's a hidden file so it can be
missed easily. For the .htaccess file to work, you need to have "Limit" and
"Options" enabled in Apache's "AllowOverride" setting.

More information about .htaccess files:
http://httpd.apache.org/docs/2.0/howto/htaccess.html

More information about AllowOverride:
http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride

Also, make sure you have MultiViews or mod_rewrite enabled. This allows a PHP
file like "/setup.php" to be accessed as "/setup".


USING A WEBSERVER DIFFERENT THAN APACHE
=======================================
If you use a different webserver, make sure to configure it to deny access to
the config.ini.php file. LOVD will access the file through the filesystem. Also,
the .htaccess file sets a couple of PHP options and enables mod_rewrite. If you
use a different webserver, please disable the following PHP options:
register_globals, magic_quotes_gpc, mysql.trace_mode.
Also make sure there is "MultiViews" functionality, which allows a PHP file like
"/setup.php" to be accessed as "/setup".


INSTALLATION
============
To install LOVD on a remote webserver, upload the LOVD directory with all the
files to the webserver by, for instance, FTP. If you install LOVD on your own
computer, you do not need to follow this step.

Next, point your browser to the install directory of the LOVD package.
Installation of LOVD takes just a couple of minutes. The forms should explain
itself. For more information, see the LOVD manual.


SUBMISSION API AND AUTOMATIC FILE IMPORT
========================================
In order to use the submission API and the automatic import feature, make sure
you have configured all the necessary paths in the config.ini.php file,
specifically set data_files to the folder where the data files (JSON data and
LOVD data file) will be stored, and set data_files_archive to the folder where
the data files will be moved to after a successful import.

Submitted files can be scheduled for automatic import by the scheduling feature
available from the Setup area. Make sure you watch the contents of this folder
with a cronjob, or keep an eye on the scheduling page to make sure you don't
miss any submissions.
To check every 4 hours for submissions and send an email when files are found,
insert the following cronjob, for a user who has access to the file path:

0 */4 * * * [ "$(ls -1A /path/to/files | grep 'lovd$')" ] && ls -1 /path/to/files | grep 'lovd$' | mail -s "Files ready to import" "your_email@address.org"

To facilitate automatic import of the scheduled import files, insert the
following cronjob, for a user of your choice:

*/15 0-5,19-23 * * * GET "http://URL_to_LOVD/import?autoupload_scheduled_file" -t 2h

Make sure GET is installed (libwww-perl) and its directory is in the PATH
environment variable. Using wget or curl is also possible, just make sure the
output is sent to STDOUT. Feel free to change the time settings.

The duration of an import depends completely on the size of the file. For very
large data files, make sure that the caller script (here, we use GET) doesn't
time out if the process doesn't return output for a while.


QUESTIONS?
==========
If you have any questions, please see our website: www.LOVD.nl
For the FAQ, see www.LOVD.nl/3.0/faq


LOVD DEVELOPMENT TEAM
=====================
The LOVD development team currently consists of:
Ivo Fokkema
Mark Kroon

And is supported by:
Johan den Dunnen
Jeroen Laros
Martijn Vermaat
Julia López Hernández

All from the Leiden University Medical Center, Leiden, Netherlands.
