Installing Anuko Time Tracker on Windows Server 2008 with Apache
Note: this section covers installation and configuration issues of Anuko Time Tracker on Windows Server 2008 with Apache 2.2.16, PHP 5.2.14, and MySQL 5.1.49. If you'd like us to include a similar detailed description for another configuration, not yet covered in
Anuko Time Tracker Installation Guide you can do so by buying a
support incident.
This installation process has been tested on a 64-bit version of Windows Server 2008 R2.
Preparing the Operating System
- Make sure that your operating system is healthy and is properly patched with the latest security fixes and service packs. You can check for required updates by clicking on Start - All Programs - Windows Update.
Installing Apache Web Server
- Go to http://www.apache.org and download the MSI Installer for Apache Win 32 Binary Including OpenSSL. The file name is httpd_2.2.16-win32-x86-openssl-0.9.8o.msi.
- After downloading and saving the file locally, double-click it and run the installer.
- Accept the License Agreement.
- Use all default options, Typical install. Apache will be installed in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\ directory. If everything is normal, you should see green Apache icon in taskbar after install as on the picture below. You can stop and start your web server by clicking on it and selecting apropriate options.
- Check if your web server works by launching a browser and pointing it to your local machine, or http://localhost/. You should see something like on the picture below, that comes from a sample index.html located in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ directory.
- Do one more test by creating a sub-directory called timetracker in your document root (C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\). Create a simple index.html file in it with the following content, which you can create in Notepad:
<html>
<head>
</head>
<body>
Hello, World!
</body>
</html>
- If you see the "Hello, World!" page it means that the Apache web server is installed and working properly.
Installing PHP
This procedure describes a MANUAL (versus using an installer) process to install PHP on Windows XP.
- Download PHP 5.2.14 zip binary distribution from http://www.php.net/downloads.php - the file name is php-5.2.14-Win32.zip.
- Create a directory c:\php\ and extract the content of php-5.2.14-Win32.zip archive into it.
- Using Start - Control Panel - System - Advanced - Environment Variables add c:\php to your system PATH environment variable.
- Create PHP configuration file by copying c:\php\php.ini-recommended to a new file c:\php\php.ini. This file contains PHP settings for your system. It makes sense to look into it and study what's defined there.
- Test if we are okay with PHP install so far by running the "php --ini" command from your command line. If everything is okay you should see something like this:
C:\>php --ini
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File: C:\php\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
C:\>
This command shows PHP configuration file names. Note that the loaded configuration file matches the one you just created.
- Reboot Windows (to apply PATH environment variable with C:\php directory included for Apache web server). This is needed for php_mysql.dll module (that we install later) to find libmysql.dll, which is required for its operation.
Configuring Apache to Work with PHP
Our next important step is to configure Apache to process PHP scripts. This requires editing Apache configuration file (httpd.conf) and restarting the Apache service.
- Open Apache configuration file C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf
- Add the following lines to the bottom of the file:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
- Save httpd.conf file.
- Restart Apache server by clicking the Apache icon in taskbar and selecting appropriate options. Make sure your Apache server starts.
- Now it's time for PHP "Hello, World!" act by creating a simple file called index.php in your htdocs directory (C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\) with the following content:
<?php
phpinfo();
?>
- Point your browser to http://localhost/index.php now. If everything is configured correctly so far, you should see PHP configuration information as on the picture below.
- Just to make sure copy the index.php file into your timetracker directory and test whether browsing to http://localhost/timetracker/index.php works similarly. If you see PHP configuration info as on the picture above it means that your Apache server is configured to run PHP scripts.
Installing MySQL Extension for PHP
When our basic PHP configuration is working it is time to install and configure MySQL Extension for PHP so that it can work with MySQL Server. It is done in 2 steps:
- Uncomment this line in php.ini by removing the semicolon:
;extension=php_mysql.dll
so that it becomes:
extension=php_mysql.dll
- Change the value of extension_dir directive to become as:
extension_dir = "c:\php\ext"
After doing so, restart Apache server and examine the output of
http://localhost/index.php - you should check that the extension_dir reflects your change and that there exist a "mysql" section with some values in it. For example:
If you don't see mysql section in phpinfo() output it means that it is not configured correctly and Anuko Time Tracker will not work.
Installing mbstring Extension for PHP
In a manner similar to enabling MySQL extension for PHP we must also enable mbstring extension. It is needed to handle multiple byte strings in different languages. Uncomment this line in php.ini by removing the semicolon:
;extension=php_mbstring.dll
so that it becomes:
extension=php_mbstring.dll
Then restart Apache and examine the output of
http://localhost/index.php - you should see "mbstring" section just above "mysql" section. If you don't see "mbstring" section in phpinfo() output it means that it is not configured correctly and Anuko Time Tracker will not work.
Installing MySQL Server
To install MySQL server (Community edition) 5.1.49 follow these steps:
- Download MySQL installer package (Windows Essentials edition) from http://dev.mysql.com/downloads/mysql/5.1.html#win32 named mysql-essential-5.1.49-win32.msi or mysql-essential-5.1.49-winx64.msi corresponding to your architecture. If you are installing a different version you may try searching for it at http://www.mysql.com
- Run downloaded .msi file to install MySQL server.
- Accept all default options during installation and proceed to MySQL Server Instant Configuration Wizard.
- Select Standard Configuration (instead of the default "Detailed Configuration") option.
- Make sure to select the "Include Bin Directory in Windows PATH" option as on this screen:
- Finally, uncheck the "Modify Security Settings" option to install MySQL without root password.

When Configuration Wizard completes it creates and starts a Windows service called MySQL. It's probably a good idea to check in this service exists in Start - Control Panel - Administrative Tools - Services and whether you can stop and start it again.
- To test MySQL installation type "mysql" in the command prompt. If everything is working you should see something like the following:
C:\Users\Administrator>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.49-community MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> exit;
Bye
C:\Users\Administrator>
- Type exit; and press Enter to exit MySQL console.
Installing Anuko Time Tracker
Now we have everything ready to install and configure Anuko Time Tracker. Here are the installation steps:
Deploying Anuko Time Tracker Source Code
Creating a Database
Create a database for your time tracker to use, as well as login and password to access it. For example, if your database name is timetracker, login is ttuser and password is ttpassword then start MySQL console and issue the following commands:
C:\Users\Administrator>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.49-community MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database timetracker;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on timetracker.* to ttuser@localhost identified by "ttpassword"
;
Query OK, 0 rows affected (0.00 sec)
mysql> exit;
Bye
C:\Users\Administrator>
- Check if the database was actually created by using the "show databases;" sql statement in MySQL console:
C:\Users\Administrator>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.49-community MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| timetracker |
+--------------------+
4 rows in set (0.00 sec)
mysql> exit;
Bye
C:\Users\Administrator>
If you see your database entry in the list of databases then we are okay.
By this point we have created a database for time tracking and defined a user / password combination to access it.
Modifying the DSN Value in config.php to Access the Database
Now, when our database is created, we need to change the DSN value in time tracker config.php file (located in its WEB-INF sub-directory) to reflect the database name and user / password combination we just defined.
- Copy the config.php.dist file located in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\timetracker\WEB-INF\ to config.php.
- Edit the C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\timetracker\WEB-INF\config.php file. Change the DSN value to provide proper database name, user name, and password to access it. For example:
define("DSN",'mysql://ttuser:ttpassword@localhost/timetracker');
The above statement defines that time tracker code will access timetracker database as ttuser with ttpassword password.
Populate the Database
To populate the database with schema and initial data point your browser to
http://localhost/timetracker/dbinstall.php and click the Create button in DB Install section.
The remainder of this page is currently under construction, sorry...
Configuring Apache to Process index.php Files
- Although index.php exists in it, the Apache web server is not yet configured to recognize it. We need to change this by finding the following fragment in httpd.conf:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
and changing it by adding index.php to DirectoryIndex so that it becomes like this:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
Do not forget to restart Apache server for this change to take effect.
Trying Anuko Time Tracker
Now it's time to test Anuko Time Tracker. Point your browser to
http://localhost/timetracker/ and check what you see. If everything is configured correctly you should see a page similar to this:

If you don't see this but instead see a blank page or some error you need to troubleshoot your entire installation and make sure that every required component is configured and works correctly (by actually CHECKING that it works, when you can).
A blank page at this point may mean many things, among others, such as:
- MySQL extension for PHP not installed or not working.
- mbstring extension for PHP not installed.
- Time tracker database not created.
- Access (login / password) to the database is not configured properly in config.php.
- MySQL service is down.
You need to thoroughly test each and every component to make sure they work together nicely.
To test Anuko Time Tracker create a new team manager account (there is an option for this in top black menu). Then create a few projects, a few activities, and then try entering time.
Cleanup
Remove the file dbinstall.php (C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\timetracker\dbinstall.php) for security reasons.
Installing GD Extension for PHP
If you start entering time now you may notice that the chart on mytime page is not displayed properly. It happens because we have not installed the GD extension yet. To install GD extension uncomment the following line in php.ini:
;extension=php_gd2.dll
so that it becomes:
extension=php_gd2.dll
Restart Apache server for this change to take effect. To make sure you have the GD extension installed take a look at phpinfo(); output for existence of a gd section.
Installing LDAP Extension for PHP
The LDAP extension is only needed if you plan to use LDAP Authentication Module for Anuko Time Tracker. Similarly to GD extension, uncomment the following line in php.ini and then restart your web server:
;extension=php_ldap.dll
Anuko Time Tracker Installation Guide