# Setting up moregroupware

Setting up moregroupware is described in this and the following chapters. Generally you should read this chapter, as it tells you about some basic requirements and skills you should have available and ready. Then you only need to read one of the following chapters, depending on the operating system you want to install moregroupware on.

## Requirements

To successfully install moregroupware you need at least the following software packages on your machine, regardless of the operating system in use.

- A webserver (Apache 1.3.x is recommended)

- PHP 4.1 or later with XML support

- Adatabase server (MySQL 3.23.x or PostgreSQL 7.x)

- PHP session auto start must be disabled!

Using Apache 2.x is NOT recommended at the moment, as it causes several problems due to bugs in relation to PHP, at least when run on Windows.

It is necessary to have a . (dot) in your PHP include_path. Look at `php.ini` to check this.

If want to create GANTT charts in the projects module, you will need support for the GD library in your PHP installation. On windows this should only be a matter of uncommenting `extension=php_gd.dll` in your `php.ini`.

You do not need PDF or IMAP support compiled into PHP for the current releases, nor do you need XML DOM. We handle those needs with PHP-only libraries. It does not harm to have those things compiled into PHP, either.

We intend to support more databases in the future. Right now MySQL works best, and PostgreSQL support is getting better (the core modules should work). Other databases will follow later.

You should try to run moregroupware with `register_globals` disabled, if it doesn't work, it's a bug. The same is true for `magic_quotes_gpc` and `magic_quotes_runtime`, both should be off. Those are not strict requirements, though.

## Upgrade

When upgrading from one version of moregroupware to the next it is recommended that you do so via a clean installation. To upgrade otherwise requires an advanced knowledge of SQL and a lot of "hacking" to your database.

An automatic upgrade function is being worked on, and as soon as it is available it will be released, but until then we highly recommend you re-install from a clean empty database.

If you want to try an upgrade, you should at the upgrade instructions in the appendix.

## Getting more.groupware

Whether you install on Windows, Unix or Mac - you need to get the software somehow. This will show you the different ways to download more.groupware.

### Downloading more.groupware releases

This is the recommended way of downloading more.groupware for most people. You can either go to the download page at moregroupware.org ,or use the Files section at sourceforge.net.

Either way, there are two flavours available, ZIP archives and gzipped TAR archives. You should download the ZIP archive only if you want to install on Windows, in all other cases you should go for the TAR archive. Note that most Windows software (including WinZip) can handle TAR archives just as well. The flavours are identical except for the archive format and the format of the line ends inside the source files (\n for TAR, \r\n for ZIP).

### Downloading more.groupware snapshots

If you want to live on the bleeding edge, using the latest code available, but don't want to (or can't) use CVS directly to get the sources, download one of the nightly snapshots. They are available at the snapshots page at moregroupware.org .Be careful though, unless we recommend to do this, you are on your own with any problems that might arise from using snapshots.

The longer ago the last release took place, the more you might want to use a snapshot. But you might want to know what you are doing.

Snapshots are only available as gzipped TAR archives. Note that most Windows software (including WinZip) can handle TAR archives just as well.

### Downloading more.groupware from CVS

Directly downloading more.groupware from the CVS (Concurrent Versions System, see www.cvshome.org )repository gives you real-time access to the latest and greatest code available. You should note though, that it might be even buggier than the snapshots! You still want to do it via CVS? Here we go...

1. Download WinCVS

   Download WinCVS 1.2 Stable from http://www.wincvs.org/ and install it.

2. Configure WinCVS for anonymous checkout and download

   1. Start WinCvs.

   2. Choose Admin - Preferences.

   3. In the field "Enter the CVSROOT" you quote `anonymous@cvs.moregroupware.sourceforge.net:/cvsroot/moregroupware`

   4. Set Authentication to "passwd" file on the cvs server. Choose Ok.

3. Doing the download

   1. Select Create - Checkout module

   2. Set the module name to `mgw` and select a local folder to save the downloaded files

4. Install more.groupware

   Now follow the appropriate instructions in this manual, according to your used operating system.

## Preparing the more.groupware setup

After you downloaded more.groupware as per the instructions above, you need to prepare some things on your machine, before you can actually run the setup procedure. Those prepartions naturally differ depending on your operating system. Therefore they are described in seperate chapters following this chapter.

- Installing on Linux

- Installing on MacOS X Server (external site!). This can be seen as an addon to the Linux instructions.

- Installing on Windows

Read the chapter that fits your choice of operating system. Those chapters contain different flavours of instructions, varying in the amount of detail in which things are described. Pick the one you like best. During those instructions you come to a point telling you to run the setup procedure. This is described in detail in it's own chapter The setup process.

After setup has completed, return to the specific instructions for your operating system to make sure you don't miss any concluding steps. Then read the chapter on Securing your more.groupware setup!

## Troubleshooting

If you get problems with your more.groupware installation you can visit the more.groupware support page http://www.moregroupware.org/support.php

You can subscribe to one of the mailing lists or browse the archives, you can visit the more.groupware IRC channel (irc.freenode.net, #moregroupware) or you can submit bug reports and support requests at the more.groupware Sourceforge project page https://sourceforge.net/projects/moregroupware/

Remember that more.groupware is a open source project and not a commercial product! You can not demand a very high service level from the developers as they are doing all the work in their limited spare time.

## Known bugs

### Webmail 2

If you try to receive big e-mails with attachements you can get a timeout like:

    Fatal error: Maximum execution time of 60 seconds exceeded in  c:\web\moregroupware\modules\webmail2\inc\class.pop3.inc on line 418
    Fatal error: Maximum execution time of 60 seconds exceeded in c:\web\moregroupware\modules\webmail2\inc\pear.php on line 498

One dirty way to fix it is to edit `/modules/webmail2/inc/class.pop3.inc`. Around line 14 you should find

    var $TIMEOUT    = 60; // Default timeout before giving up on a network operation.

If you change from e. g. 60 to 260 you should not so easily get the timeout.

if you see memory error messages like:

    Fatal error: Allowed memory size of 8388608 bytes exhauste (tried to allocate 8192 bytes) in ...

This happens because the webmail2 module downloads email from the mail server. These email can only be downloaded in one step, that means the whole email is copied to the memory and then stored on your harddisk. e.g. an email with the size of 5 MB needs about 10-15 MB in the memory.

To fix it you have to increase the memory limit in php.ini:

    memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

Increase this value to '16M' (16 MB) or more (depends on the size of the emails you get, often there is a limit on the mail server [e.g 10 MB for gmx]).

If you have problems with sending and/or receiving emails with large attachments you should try to increase the values for 'post_max_size' and 'upload_max_filesize' in `php.ini`. Set them to a value high enough, e.g. '20M'.

### General strange behavior of moregroupware

Check `php.ini` and the parameters below as mentioned earlier in this guide:

    include_path = "."
    register_globals = On

Login screen in stead of the data you expected: Internet Explorer 6 can behave strange together with more.groupware. Some times I have had good results with erasing temporary files from my computer. After such a clean up everything often works fine for a while.

If you get problems with the graphics, login screen in stead of that you expected etc. a solution can be to change the following line in `config.inc.php`:

    $appconf["rooturl"] = "http://localhost/moregroupware";

to look like this:

    $appconf["rooturl"]="http://".$HTTP_SERVER_VARS["HTTP_HOST"]."/moregroupware";

Wrong URL in config.inc.php: You install moregroupware, log in and everything is ok. Another person on your network tries to login and doesn't see the right layout at the login screen (and login fails).

Solution: Go to the home directory of mgw, take a look at `config.inc.php`. Look for the variables:

    $appconf["rooturl"] = ...
    $appconf["rootpath"] = ...

If `$appconf["rooturl"]` is something like `http://localhost/moregroupware/` or `http://127.0.0.1/moregroupware/` you have to replace `localhost` or `127.0.0.1` with your real IP address that is reachable from other computers in the net.

A solution can also be to change from:

    $appconf["rooturl"] = "http://localhost/moregroupware";

to

    $appconf["rooturl"]="http://".$_SERVER["HTTP_HOST"]."/moregroupware";