# Setting up WAMP and more.groupware

## Introduction

To get a stable installation I will recommend running more.groupware at Linux. But it is also possible to install more.groupware to run at the Windows platform. I have managed to get more.groupware to work both under Windows NT, Windows 2000, Windows XP and even Windows 9x (not so very stable).

Remember to make a `tmp` folder on the system partition (C:). If not you can get many strange PHP errors as the default `php.ini` file is set to use that temporary folder to e. g. session files.

You can of course also edit php.ini to use another temp folder (session.save_path = /tmp) if you want.

## Download

In order to run more.groupware at your "server" you must have installed:

- Apache web - server

- PHP4 server-side scripting system

- MySQL database

- And of course the more.groupware package.

The first ting you should do is to download the packets mentioned above to a temporary catalogue at your computer:

- Apache: Download Apache (e. g. apache_1.3.27-win32-x86-no_src.exe) from http://www.apache.org/dist/httpd/binaries/win32/

- PHP4: Download PHP-4.x-Win32.zip package from http://www.php.net/downloads.php

- MySQL: Download from http://www.mysql.com/downloads/

- more.groupware: You can visit http://www.moregroupware.org/download.php to download the latest stable version of more.groupware

To get the newest version you should use WinCVS. You will find instructions about using WinCVS at the bottom of the page at http://www.moregroupware.org/download.php .

If you think it is complicated to configure WinCVS you can in stead download with your browser the latest stable-tree snapshot from http://www.moregroupware.org/snapshots.php .

Ok. Now you have downloaded the files you need to install more.groupware. Now we shall begin to install the downloaded stuff.

## Installing Apache

First we begin with installing Apache. Installing Apache is quite easy as the installation program uses the known Installation Wizard system.

Run the Apache installation - file, press Next, Agree with the License Agreement, Next and Next. Now we have come to some important choices regarding Server Information:

- Network Domain: Just write something of your own choice here if you only shall use more.groupware at the inside of you local network (e. g. mydomain.net).

- Server name: Write your Windows PC name here. It should be the name that the other computers in the network use if they want to communicate with your PC (e. g. PC1). If you are unsure of the name you could write localhost.

- Administrator's Email Address: Your e-mail.

Press Next, choose Complete installation together with Next and accept standard installation path. Press Next and Install. (If you must do some configuration changes afterwards you will have to edit httpd.conf. To do that you can choose Start + Programs + Apache HTTP Server + Configure Apache

After the installation you will find a new program group called Apache HTTP server with possibilities to edit configuration and to start / stop / restart Apache (Start + Programs + Apache HTTP server + Your choice).

Start your favourite internet browser. Write in the address http://localhost/ or http://yourPCname/ (yourPCname is the named you wrote in the Server Name field when you installed Apache). You should now get a test page which tells you what Apache is running.

We shall do some configuration changes in Apache later, but now it is time to install PHP

## Installing PHP

- Unzip the php zip - file to C:\php (To unzip the files you will need Powerarchiver or Winzip or a similar tool).

- Use Windows Explorer to get into the folder `C:\php`

- Rename php.ini-dist to php.ini and open the file in a text editor (e. g. Notepad).

- Create the folder `C:\web` where we shall store the HTML/PHP files.

- You must do two changes in the file: `doc_root` shall be changed to `doc_root = "c:\web"` and `extension_dir` shall be changed to `extension_dir = "c:\php\extensions"`

- Save the file.

Usually not necessary: If you get problems with the Apache/PHP-integration you can try to move (or copy) both `php.ini` and `php4ts.dll` to your windows path (e. g. `C:\winnt` or `C:\windows`).

Some times you also have to change the Windows include path in `php.ini` from `;include_path = ".;c:\php\includes"` to `include_path = "."` (remove ; and at least use a dot (.) as include_path.)

You must also do some configuration changes in the Apache configuration file to get PHP to work. Open `C:\web\Apache\conf\httpd.conf` in your text editor (e. g. Notepad) and do the following changes:

    DocumentRoot "C:/web"

    <Directory "C:/web">

Use / (forward slash) and NOT \ (backslash)!!!!

Find the line `AddType application/x-tar .tgz` and add the following lines below:

            ScriptAlias /php4/ "c:/php/"
            AddType application/x-httpd-php .php
            AddType application/x-httpd-php .php3
            AddType application/x-httpd-php .php4
            Action application/x-httpd-php "/php4/php.exe"

To avoid file listing in stead of running `index.php` files you can add `index.php` to the `DirectoryIndex` parameter:

            DirectoryIndex index.html index.php

Save your file. You now have to restart the Apache web server to activate the changes.

After restarting the Apache server you can make a test file to check that the PHP extensions work. Start your text editor, write

    <?php phpinfo(); ?>

and save the file in `C:\web` as `test.php`

Start your webbrowser with the web page `http://localhost/test.php` or `http://yourPCname/test.php`. You should get a lot of information about PHP.

### Setting up PHP as Apache module

Above we have set PHP Server API to CGI. To get better speed etc. it can be a smart move to change from CGI to Apache. To do that you must open httpd.conf and replace the lines below:

    ScriptAlias /php4/ "c:/php/"
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php .php4
    Action application/x-httpd-php "/php4/php.exe"

with:

    LoadModule php4_module c:/php/sapi/php4apache.dll
    AddModule mod_php4.c
    AddType application/x-httpd-php .php

You must MOVE `php4ts.dll` from `C:\php` to `C:\windows\system32` (or `C:\winnt\system32`). `php.ini` should be moved to `C:\windows` (or `C:\winnt`). Stop and start Apache to activate the changes.

## Installing MySQL

Unzip the MySQL zip file to a temporary place and run the setup file (Setup.exe). You will meet an easy to use installation wizard. Press Next, Next and accept standard installation path. Chose Ok, Next, Typical followed by Next and wait while the setup - program copies the files. Press Finish after the setup is completed.

MySQL will normally automatically start under the boot of the PC. You can also start the service manually with running Winmysqladmin.exe from the \bin folder where MySQL is installed.

When MySQL is running you will see a "green light" beside the clock in right bottom corner. The first time you run Winmysqladmin you will sometimes get a question about username and password. Assign a username and password you manage to remember. If you don't get the question MySQL will use the username and password you use to log into Windows.

## Installing more.groupware

Unzip and move the more.groupware - folder you have downloaded to `C:\web\moregroupware`. In `C:\web\moregroupware` you shall now find some folders (docs, include, modules etc.) and also the file `index.php`.

Now it is time to make an empty MySQL database which more.groupware can "populate" with data. Start Winmysqladmin and choose Databases. Press right mouse button inside the white databases window and choose Create Database. Give your database a name (e. g. MGW) and press Create the Database. Choose Environment and Hide me to hide away the WinMySQLadmin - window.

Start your web - browser and open the web - page `http://yourPCname/moregroupware/setup/index.php`. The setup is described here in full detail.

## More support and help

You will find more information about the installation of Apache, PHP and MySQL at the web - page http://www.net-language.com/workshops/Default.asp?Workshop=21&step=1