In most of my professional work, I’ve used Novell products, Microsoft products, and a little bit of UNIX/Linux. You may notice that I tend to write a lot of articles geared towards the Linux crowd. There is a simple reason for this: The Linux folks are working on some really great stuff!

PhpGroupWare is one of those great things. While the development team has only recently completed their first release candidate, phpGroupWare could become an extremely popular package, especially for small to midsize organizations like Louisville, KY’s newspaper, The Courier-Journal, which currently uses it.

The developers of phpGroupWare have their sights set on becoming a full-fledged extensible groupware suite, and they are poised for great success. The package already includes an e-mail client, calendar, task lists, a file manager, newsgroup support, FTP client, forums, chat, and even fax integration. By now, you may be drooling. If you are, clean it up and read on to learn how to get this system up and running quickly.

As its name implies, phpGroupWare requires a functional PHP engine on the server and a Web server—the entire package is Web-based. For this installation, I used the Apache Web server version 1.3.xx and PHP 4.1.1. Since phpGroupWare can be used to send and receive e-mail, a working IMAP or POP server is a good idea. Courier IMAP is the preferred IMAP server for phpGroupWare. You’ll need to install it separately from phpGroupWare.

More Courier IMAP

For more information on getting the Courier IMAP server up and running, check out “Using the Courier-IMAP server” by Vincent Danen.

Before you begin, make sure PHP is installed and working properly. To do this, place a script called test.php in the /usr/local/apache/htdocs directory with the following contents:
<? phpinfo() ?>

Document root

Depending on your distribution, the Apache document root could be located in either /usr/local/apache/htdocs or /var/www/html.

If all is well, when you point your browser to that page, you will get a status screen full of information about your PHP installation, like the one shown in Figure A.

Figure A
This shows the PHP information screen as rendered by a Web browser.

Second, a backend database is required. Either MySQL or PostgreSQL will work fine for this component. For my examples, I used MySQL, because getting phpGroupWare running under MySQL is a bit simpler. However, I prefer PostgreSQL.

Before you continue, make sure that PHP, Apache, and MySQL all work together. In my article “Web site flexibility with security: PostgreSQL, Apache, PHP, and SSL,” you can see how this is done with PostgreSQL (which should be easy enough to transpose to MySQL).

The next step is to download phpGroupWare from the phpGroupWare Web site. The current stable release is version 0.9.14.RC1. The RC1 stands for release candidate 1, which means that the final release is not far off.

Place this download in your home directory (i.e., /home/slowe).

First, expand the tarball that you downloaded from the phpGroupWare Web site into its final location. Install it in a subdirectory under the Apache HTML document root directory named phpgroupware using the following command:
cd /usr/local/apache/htdocs
gunzip -dc /home/slowe/phpgroupware-0.9.14.RC1.tar.gz | tar xvf –

Next, set directory permissions so phpGroupWare can use them with this command:
cd /usr/local/apache/htdocs/phpgroupware
chown nobody:nobody files
chmod 700 files

You’ll then need to set up the databases that phpGroupWare uses to house its data with the following command:
mysqladmin -u root -p create phpgroupware
mysql -u root -p
mysql> grant all on phpgroupware.* to phpgroupware@localhost identified by “pw”;

Remember that while phpGroupWare supports both MySQL and PostgreSQL, my examples use the MySQL instructions. When prompted, enter the appropriate passwords. These passwords will be dependent on your particular MySQL installation.

The configuration for phpGroupWare is performed via a Web browser. To begin this step, point your browser to http://<your server>/phpgroupware/setup/index.php (where <your_server> is the IP address or URL of your server).

Figure B
This configuration screen will walk you through creating your header file.

To create a proper file, which will be used heavily by phpGroupWare, use the configurations in Figure C. It shows the necessary configurations for the values on the setup screen.
Figure C

phpGroupWare configuration options
Parameter Explanation Value
Server root
This parameter tells phpGroupWare where to find its files.
{or the Apache server default root/ }

Include root
This parameter allows applications that normally require root access to be run as standard users. Not a wise parameter to use.
{ same as Server root }
Admin password to manage header
This sets an administrative password for managing the header file.
{ default: blank }
This is a required parameter, so enter and remember a password here.

DB host
This determines which server will house the DB (database).
{ default: localhost }
DB user
{ default: phpgroupware }
For this installation: root

DB password
This asks for the password for the database.
{ default: your_password }
For this installation, use your MySQL root password.

DB type
With this parameter, you can choose either MySQL or PostgreSQL.
{ default: MySQL }
Configuration password
This password will be used to manage the phpGroupWare installation.
{ default: blank }
Enter something and remember it as this is a required parameter.

Persistent connection
This asks if you want a persistent connection to the database.
{ default: True }
Sessions type
This asks whether the software should use PHP4 controls or database controls to manage sessions.
{ default: db }
For this installation: PHP4

Enable MCrypt
Enable MCrypt to replace the older cryp file stream encryption application.
{ default: false }
MCrypt version
Designate which version of MCrypt to use (this will vary from country to country).
{ default: blank }
MCrypt initialization vector
This allows you to declare what vector the encryption will begin from (if you explicitly declare an encryption vector, you must use the same vector for decryption).
{ default: varies from system to system }
Domain select box on login
Allows multiple domain log on to more than one domain’s e-mail server
{ default: false }

Necessary configurations for the values on the setup screen

At the bottom of the configuration screen, you may notice that there is a message indicating that the file cannot be saved due to problems with the file permissions. The developers have taken this into consideration and also allow the user to manually create the file. If you opt to manually create the header file, you will have to open up your favorite text editor and create the file by hand. Click the View button to continue.

The next screen produces output that will be used at the file. Simply copy these contents into a new text file that you will name in /usr/local/apache/htdocs/phpgroupware. Then, click Continue.

Once you type a password into the Setup/Config Admin Login box and press the Login button, you’ll see the main configuration screen for phpGroupWare (see Figure D). This password was defined on the header setup section of the screen (see Figure B).

Figure D
The initial admin setup installs the applications for you.

Click the Install button (see Figure D above) to set up the database tables to be used by phpGroupWare.

Next, click on the text that reads Click Here to create an admin user and three demo users, which I will be using in the rest of this example. You will be prompted for the admin user name information—for my example, I named the user admin with the password of admin.

Adding applications
So far, we’ve completed an installation of the framework for phpGroupWare. Its functionality right now is only to create users and manage the configuration. You next need to add some applications to phpGroupWare. To begin installing applications, click Manage Applications, and you will then see Figure E.

Figure E
To install an application, simply select the check box to the right of its name.

When finished with application selection, click the Submit button at the bottom of the window. For this article, I installed the following applications:

  • ·        Addressbook
  • ·        Admin
  • ·        Calendar
  • ·        E-mail
  • ·        File Manager
  • ·        Forum
  • ·        Manual
  • ·        Projects
  • ·        Time Track
  • ·        To Do

Once you click submit, you’re given this output notifying you that everything installed as planned.

Click the Go Back text (which will appear at the bottom of the install output page) to return to the application list. Notice that the applications you previously selected are now showing a version number and an option to remove them. At the left-hand side of each installed application, you’ll see a circle with an X in it. Clicking one of these buttons will give details about that particular application. For example, Figure F shows us the details of the calendar application.

Figure F
The details of the Calendar application even show where the application gets its configuration files.

Before continuing, you must define the phpGroupWare root directory. To edit this configuration parameter, click the Edit Current Configuration button from the Configuration window. You can use your browser’s Back button to get back to the Configuration window. The parameter in question is Enter The Location Of phpGroupWare’s URL, which I set to for this example.

Using phpGroupWare
To start using phpGroupWare, browse to http://server_ip/phpgroupware/index.php (where server_ip is the address of the server where you have phpGroupWare installed), and you will see the login screen shown in Figure G.

Figure G
The phpGroupWare user login dialog is fairly minimalist.

For this example, I logged in as one of the demo accounts created in the last step. The Username is demo, and the Password is guest.

At the top of the phpGroupWare main screen are icons for the applications that you previously installed. For this article, I’ll briefly explain the calendar application.

To use the calendar, I just click the calendar icon (see Figure H).

Figure H

Once I click on the Calendar Icon, I will have revealed to myself the current month, as shown in Figure I.

Figure I
The main calendar screen shows the current month with the current day highlighted.

Clicking on a day will expand that selection to show the schedule for that particular day (note the entry for Feb. 8 at 10:00 A.M.). Figure J shows an expanded view of Feb. 8.

Figure J
Add appointments by clicking on the time to the right of the day’s listing.

And more!
The developers of phpGroupWare are working hard to make this program as full-featured and customizable as possible. To that end, most of the components in phpGroupWare offer customization options that you can tailor to your needs. For example, in the calendar, the first day of the week can be changed to Saturday, Sunday, or Monday depending on your needs, and the workday time range can be specified. Access can be granted to other users to allow them to view, update, or remove items from another user’s calendar. It’s impressive, especially for a free, completely open source program.

When coupled with a working IMAP server and backend database, phpGroupWare is capable of meeting the needs of many small to midsize companies and possibly even larger ones.