
phpsls Installation
-------------------

If you have perl installed (and you probably should), then you can simply
run the script "install.pl". But you can do it by hand, if you want to.
Just follow these steps.

Installing phpsls is quite easy:

1.) Copy the phpsls directory in your Webserver's RootDirectory or any other 
    valid htdocs directory.

    e.g.: cp -R phpsls /usr/local/share/apache/htdocs

2.) Edit the file config.php3 in the directory inc.
    You must change the following values: The server on which your database is 
    running (dbserver) , the username and password required to log in (dbuser 
    + dbpasswd) and the name of the database (dbname).
    You must also give a recipient who gets an email when somebody goes shopping
    (mailto). (Ideal would be a mailinglist so that all user get an email.)
    At last change the value for the person who sends the email ("mailfrom").
    
3.) Create the database.

    To make things easy we call the database phpsls;
    
    e.g.:
    # mysqladmin -u root -p create phpsls
    Enter password:

    After entering your password and things went the way they should,
    you should see:
    Database "phpsls" created.
    

4.) Set the right permissions.
    
    e.g.:
    # mysql -u root -p phpsls
    Enter password:
    
    mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON phpsls.* TO
	 > db_user@localhost IDENTIFIED BY 'db_password';
    
    Username and Password must be the same as the ones you put in config.php3.

    Alternatively, you can edit the file grant.sql and do batch-processing.

    e.g.:
    # mysql -u root -p < grant.sql;

5.) Create the database tables by doing batch-processing.

    e.g.:
    # mysql -u root -p phpsls < shoppinglist.tables.sql

6.) Add a user to the database. Edit the file adduser.sql and do
    batch-processing as before.

    e.g.:
    # mysql -u root -p phpsls < adduser.sql

7.) If you feel unsure you can check if the tables were added by doing:
  
    # mysql -u root -p phpsls
    Enter password:
    mysql> SHOW TABLES;
    mysql> DESCRIBE TABLES;
    mysql> SELECT * FROM user;
    
8.) Finished!
