		WebCalendar Installation Instructions


NOTE: If updagrading a previous from a previous version, see the file
UPGRADING first.

NOTE: Version 0.9.22 adds support for calendar layers and adds a new
table.  Please see UPGRADING.

NOTE: Version 0.9.12 changes the way events with no time are handled.
Please see UPGRADING.

NOTE: Version 0.9.7 uses a different set of table names than 0.9.6.
Please see UPGRADING.


REQUIREMENTS
---------------------------------------------------------------------------
You must have PHP and one of the following databases installed:
  - MySQL
  - Oracle 8
  - PostgreSQL
  - ODBC
For the database you choose, you must have its drivers built into
PHP.  For example, to use MySQL, PHP must be compiled with MySQL
support.  See the PHP (www.php.net) for more info on setting up
PHP.

No optional PHP packages (other than MySQL) are required for this
application.  However, PHP shoud be compiled with --enable-track-vars
on some systems.  (Not sure why this is.  The <?php php_track_vars?>
directive seemed to work fine on my system without having to use
--enable-track-vars.)

You can run PHP either as a CGI or an Apache module.  You'll get better
performance with PHP setup as a module.  Not only will you not have to
deal with the CGI performance hit, but you'll be able to use PHP's
database connection pooling.  Additionally, this application can use
a form/cookie-based authentication or traditional HTTP authentication.
For traditional HTTP authentication, PHP must be built as an Apache
module.


FILE UNPACKING
---------------------------------------------------------------------------
Unpack the calendar software in its own directory somewhere where
your web server will find it.  (See your web server docs for info.)


DATABASE SETUP
---------------------------------------------------------------------------
You can place the calendar db tables in an existing database or
create a new database with the following:
  MySQL (from command line):
	mysqladmin create intranet
	(This will create a database named "intranet".)
  Oracle (from within sqlplus):
	CREATE TABLESPACE webcalendar
	DATAFILE 'webcalendar.dat' SIZE 10M
	AUTOEXTEND ON NEXT 10M MAXSIZE 40M;
  PostgreSQL:
	create database webcalendar;
	\c webcalendar
	\i tables-postgres.sql
	\q

For Oracle, you will want to setup a new user that defaults to
this new tablesapce:
  Oracle (from within sqlplus):
	CREATE USER webcalendar IDENTIFIED BY webcal01
  	DEFAULT TABLESPACE webcalendar;
	GRANT dba TO webcalendar;
	(Note: I use "webcal01" for a password rather than
	"web!calendar" because sqlplus barfs on the "!")

Create the calendar tables using the supplied tables.sql file:
  MySQL (from command line):
	mysql intranet < tables-mysql.sql
	(where "intranet" is the name of your database)
  Oracle (from command line):
	sqlplus webcalendar/webcal01 < tables-oracle.sql
  PostgreSQL:
	(This was already done using the PostgreSQL commands
	above.)

This will create all the needed tables and setup one user account
with the login "admin" and password "admin", which you are encouraged
to use to create your own account.


APPLICATION SETUP
---------------------------------------------------------------------------
You can place the calendar db tables in an existing database or
Next, you will need to customize the file "includes/config.inc"...

To configure your MySQL access.  Set the values for:
  - $db_type		One of "mysql", "oracle", "postgresql" (untested),
			or "odbc" (untested)
  - $db_host		The hostname that database is running on
			(Use localhost if it's the same machine as
			the web server)
			(This variable is not used with ODBC)
  - $db_login		The database login
  - $db_password	The database password for the above login
  - $db_database	The name of the database that the calendar
			tables reside in.  ("intranet" in the example
			above.)
			For ODBC, this should be the DSN.

You can configure the calendar to run in single-user mode or multi-user mode.
If this is your first time using the calendar, it's easier to try single-user.
You can always switch to multi-user later.  Leave the $single_user_login
variable commented out (the default) for multi-user, or remove the
"//" comment tags to set the system to single-user mode.  (And be sure
to set the value of $single_user_login to the login that you would choose
if you decide to switch to multi-user mode some day.)

Note: If you do decide to switch from single-user mode to multi-user mode,
make sure you add in a user to the system for the login you set the
$single_user_login variable to.


PALM PILOT USERS
---------------------------------------------------------------------------
You might want to configure your web server so that users can not access
Exporting data to your Palm Pilot is possible with install-datebook tool,
which is part of the pilot-link distribution.  You can download pilot-link
from:
	http://sourceforge.net/project/?group_id=2158
Unfortunately, there are some bugs in the install-datebook utility, so you'll
need to patch it before you compile and install pilot-link:
	patch -p0 < install-datebook.patch
Note that install-datebook does not currently support repeating events, so
repeating events will not show up as repeating on your Palm Pilot.  The
tool is not smart enough to know when it's already added an event, so if
you use it twice with the same data, you'll get duplicates in your Palm
Pilot Calendar.


OPTIONAL!
---------------------------------------------------------------------------
You might want to configure your web server so that users can not access
the "includes" directory.  For example, if a user typed in the URL for the
"includes/config.inc" file, they would be able to see your database login
and password, which is not a good thing.  See your web server documentation
on how to do this.


RUN WITH IT
---------------------------------------------------------------------------
You can place the calendar db tables in an existing database or
Hey, you're done...  Give it a try by logging in using the default
"admin" account (if you're setup for multi-user) or just go to index.php
if you're setup for single-user mode.

FYI, the default password for the "admin" user is "admin".


PROBLEMS
---------------------------------------------------------------------------
See the README file for some FAQs.

