INTRODUCTION

Thank you for downloading the lightml.
This file describes how to create configuration for Lightml project. If you control your databases through a web-based control panel, check its documentation, as the following instructions are for the command line only. Lightml is open source under the GPL license.

INSTALLATION AND CONFIGURATION

1. PREREQUISITES

Make sure you have it installed by opening a command line and typing this command:

	 php -v 

If the version number is 5.2 or higher, then you're ready for the installation, as described in this chapter.
Lightml is a simple archive of files. It contains an empty lightml project including all the required libraries, a default template, and basic configuration. It will work out of the box, without specific server configuration or any additional packages.

To install it, download Lightml archive from Sourceforge. Unpack it under the root web directory configured for your server (usually web/ or www/).

2. CREATE THE LIGHTML DATABASE

This step is only necessary if you don't already have a database set-up (e.g. by your host). In the following examples, 'dba_user' is an example MySQL user which has the CREATE and GRANT privileges. Use the appropriate user name for your system.

First, you must create a new database for your Lightml project (here, 'databasename' is the name of the new database):

	  mysqladmin -u dba_user -p create databasename 

MySQL will prompt for the 'dba_user' database password and then create the initial database files.

3. EDIT THE LIGHTML SETTINGS FILE

Lightml comes with a sub-package containing sample configuration, templates and data which demonstrate how to use Lightml in common cases.
For now focus on the database section of the configuration file. You need to enter your database's information.
Open config/settings.yml file with your favourite editor and change the variables in [Custom Settings] section:

	Dsn: "mysql:dbname=your_db_name;host=localhost"
        UserName: "your_user"
        PassWord: "your_psw" 

You may change the value of any variable in [Custom Settings] section. Only the Dsn, UseName, PassWord are necessary.

4. CREATE LIGHTML CONFIGURATION

You also need to set full access to the config/ ,www/ and www/static/ directories:

	> cd ~/lightml
	> chmod 777 config
	> chmod 777 www
	> chmod 777 www/static

If you are in the `lightml/bin` directory, you can use the command line to do usual site management operations. For instance, to create the configuration file, type:

    $ php ./lightml-cli.php -d                      (*nix)
    php lightml-cli.php -d                          (Windows)

5. CHECK YOUR LIGHTML CONFIGURATION

If you are in the `lightml/bin` directory, you can use the command line to do usual site management operations. For instance, to check the prerequisites, type:

    $ php ./lightml-cli.php -v check                      (*nix)
    php lightml-cli.php -v check                          (Windows)
    $ php ./lightml-cli.php -v path                       (*nix)
    php lightml-cli.php -v path                           (Windows)
    $ php ./lightml-cli.php -v variables                  (*nix)
    php lightml-cli.php -v variables                      (Windows)

YOUR FIRST PROJECT

1. AVAILABLE OPTIONS

You can use the command line to do usual site management operations. To discover all the available actions of the lightml command line, type:

    $ php ./lightml-cli.php                      (*nix)
    php lightml-cli.php                          (Windows)

    $ php ./lightmlDB-cli.php                      (*nix)
    php lightmlDB-cli.php                          (Windows)

2. QUICK START

The project is not yet ready to be viewed, because it requires a few records into links, category tables. Just import the config/sample.mysql
If you use a web-based control panel, you should be able to upload the appropriate file and run it directly as SQL commands.

From the command line, use (again, replacing 'username' and 'databasename' with your MySQL username and database name):

    for MySQL 4.1 or higher:
    mysql -u username -p databasename < config/sample.mysql

Once you have a database and a few records in it you can export your lightml project, just type in the command line:

    > cd ~/lightml/tools

    $ ./export.sh                      (*nix)
    export.sh                          (Windows)

To access it, call:

    http://localhost/lightml/www

If, at this point, you meet an error, this means that your web server doesn't support mod_rewrite or .htaccess file is missing.

That's it. Now you can work on the files located in templates/ and commit your modifications from the command line using lightml-cli.php or export.sh. This will create into www/ directory and the www/static folder your application configuration and a set of directories ready to host the file of your website:

	www/
  	   static/

3. ADMIN INTERFACE

I am still developing the application, which is currently in its early stages. Presently, plans are being drafted to add an admin generator. You may use a web-based control panel like phpMyAdmin or you may create your own.

REPORT BUGS

Your feedback is needed! If you have encountered a bug in lightml Beta, please report this bug his bug using the following URL:

Report bugs

GETTING HELP

There is no official support for Lightml Beta, but you can discuss the beta version in the Lightml Forums:

Getting help

HAPPY LIGHTML!

Last updated on 05 May 2008