# Setting up more.groupware

Setting up more.groupware 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 more.groupware on.

## Requirements

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

- A webserver (Apache 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!

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`, on most Linux distributions it similar.

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, though.

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 more.groupware 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.

The setup will check all those (and some more) things, and tell you when something is wrong or missing.

## Upgrade

When upgrading from one version of more.groupware 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 look 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... the SourceForge.net CVS page for more.groupware.

You already have a webserver, a database and PHP up and running? You think you understand the error messages (if any) setup will show you? Skip to Preparing the more.groupware setup

You need to have a running webserver, database and PHP as already mentioned earlier. On most Linux distributions getting those components running is really easy and usually just a matter of selecting the packages using the distributions's package management tool. There are also quite a few LAMP/WAMP installations tutorials available in the web. We make it even easier, so if you still need help with this, have a look at the following appendices:

- Installing Apache, MySQL, PHP and more.groupware on Linux

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

- Installing Apache, MySQL, PHP and more.groupware on Windows

Read the appendix 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 the chapter: The setup process.

## Preparing the more.groupware setup

After you downloaded more.groupware as per the instructions above, make the unpacked more.groupware root folder to writable for the webserver and create a database user for use with more.groupware. You can create a database now, or let setup do this - your choice.

Now read The setup process.

After setup has completed 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 an open source project and not a commercial product! You cannot demand a very high service level from the developers as they are doing all the work in their limited spare time. We try help where we can, though!

## 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 more.groupware

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

    include_path = "."
    register_globals = Off
    session.auto_start = Off

While you are editing `php.ini` anyway, you might want to change some more things:

    display_errors = Off
    error_reporting = E_ALL ~ E_NOTICE
    log_errors = On
    error_log = /var/log/php.log

(make sure Apache has the rights to write to this file). This will make all erros and warnings go to a log file instead of to the screen, which solves a lot of problems already, and makes it easier to work on the remaining ones.

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 more.groupware, 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";