************
PHP-Calenar
************

0 Preface
1 Requirements
2 Installation
3 Errors
4 Translations

----------
0 Preface
----------

The installation-work arounds in this installation guide are based on the input
I have received from other users on different systems.  If you encounter
installation issues that are not mentioned here, PLEASE notify (contact info
is in the AUTHORS file).

---------------
1 Requirements
---------------

-PHP 5.0 or higher http://www.php.net/ with MySQLi extension
  GNU gettext and PHP with gettext support are required for translations
-MySQL 4.1.3 or higher http://www.mysql.com/
-SSH or an FTP program which and utilize the CHMOD command
  For SSH on Windows, try putty at
    http://www.chiark.greenend.org.uk/~sgtatham/putty/
  For FTP on Windows, try FileZilla: http://filezilla-project.org/

---------------
2 Installation
---------------

Instruction for people that are installing on a web host or some computer other than the one that they are working on are indicated with "remote host only"

0) Make sure you have fulfilled all of the requirements listed above.
Make sure PHP and MySQL server are installed and running on your server.

1) extract the files from the archive
   (in linux: tar -zxf php-calendar-x.y.tar.gz)

2) (Remote server only) Use FTP to connect the server your webpage is stored on
   and create a new directory where you want to store the calendar (example:
   'calendar' for www.mydomain.com/calendar).  You can call it whatever you
   want.

Optionally:
   From the php-calendar/install directory run: php translate.php
   to automatically setup the translation files or open that file in a web
   browser (ie. http://www.example.com/php-calendar/install/translate.php)

3) Open up a browser window and navigate to the file install.php in your
   calendar folder of your webpage
  (ie. http://www.example.com/php-calendar/install/install.php)

4) Follow the directions given by the installer.

-----------
3 ERRORS
-----------

this section assumes you are using MySQL, but it may be helpful for everyone.

Message: ERROR  db:1044: Access denied for user: 'MySQLusername@localhost'

Solution: Make sure you have your MySQL username and password correct in the
config.php file.  Contact your host or administrator if you don't know what
they should are.

Message: ERROR  create db:1044: Access denied for user: 'username@localhost'
to database 'databasename': CREATE TABLE phpc_events

Solution: You do not have the abilty to create tables. You need to grant
permission to create tables on the user that you're using for the calendar.

Message: ERROR  Software error  Couldn't select database

Solution: Make sure the name of you MySQL database is correct in the config.php
file.  Contact your host or administrator if you don't know what the database
name is. Make sure the SQL_PREFIX is set to 'phpc_', or whatever the prefix of
your tables is, in the config.php file

---------------
4 Translations
---------------

1) Make sure that you have GNU gettext and the PHP gettext module installed. On
   Debian and Ubuntu the latter is in the package "php-gettext".

2) You will need to make sure that you have the locale for the desired language
   installed. This is very much system dependent. On Debian run
   "dpkg-reconfigure locales" as root and select the desired locale.

3) You will need to generate the messages.mo files for each language. There is
   a script called "translate.php" in the install directory to generate the
   messages.mo files. Run the command "php translate.php" from the "install"
   directory. If for you need to generate it manually, in the "LC_MESSAGES"
   directory for each language you will need to run the
   command: msgfmt -o messages.mo messages.po

Good luck!
Sean Proctor
sproctor@gmail.com
