Home Contact Buy Now
Home Download Video Free Buy Now Site Map Contact

Installing Time Tracker on Windows 7 with Apache

Note: this section covers installation and configuration issues of Anuko Time Tracker on 32 bit Windows 7 with Apache 2.2.14, PHP 5.2.12, and MySQL 5.1.37. This is an old document, which is provided for information only. You may wish to check the installation process.

Install Apache

  • Make sure that you don't run any other web server on your host. Particularly check that Internet Information Services (IIS) is not installed or at least not running on your host: Start / Control Panel / Programs / Turn Windows features on or off / Internet Information Services.
Turn off Internet Information Services to avoid port conflict
Turn off Internet Information Services to avoid port conflict

  • Download Apache HTTP Server from http://httpd.apache.org/download.cgi . Choose Win32 Binary including OpenSSL 0.x.x (MSI Installer). E.g. apache_2.2.14-win32-x86-openssl-0.9.8k.msi
  • Run Apache HTTP Server installer.
Apache Installation Wizard
Apache Installation Wizard


Choose Typical setup type. Server will be installed to C:\Program Files\Apache Software Foundation\Apache2.2\ by default.

Once the installation is complete, verify it by clicking on the Apache Icon in the taskbar. You can also verify your installation of Apache by opening http://localhost/ in your browser.

It works! - default home page after Apache install
It works! - default home page after Apache install

Configure Apache

Stop Apache. Open C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf with Notepad. Find section <Directory “C:\Program Files\Apache Software Foundation\Apache2.2\htdocs”> and replace Options and AllowOverride directives in it from:
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
</Directory>
to:
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
    Options None
    AllowOverride All
</Directory>
Find section <IfModule dir_module> and replace DirectoryIndex index.html with DirectoryIndex index.php index.html so that it becomes:
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>
Start Apache.

Install and Configure PHP

  • Download PHP 5.2.x installer from http://www.php.net/downloads.php Windows Binaries section. E.g. php-5.2.12-win32-installer.msi.
  • Run PHP installer. Keep the default Destination Folder.
  • Choose Apache 2.2.x module:
Choose Apache 2.2.x module
Choose Apache 2.2.x module


Select Apache config directory
Select Apache config directory

  • Choose the following items to install:
Extensions / bzip2
Extensions / Curl
Extensions / GD2
Extensions / Gettext
Extensions / LDAP
Extensions / Multi-Byte String
Extensions / MySQL
Extensions / MySQLi
Extensions / OpenSSL
Extensions / PDO / MySQL
Extensions / Shared Memory
Extensions / SOAP
Extensions / Sockets
Extensions / zip
  • Restart Apache HTTP Server (use Apache monitor in the system tray).
  • To check if PHP works create a file C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\php.php with the following content in Notepad:

Create phpinfo file using Notepad
Create phpinfo file using Notepad

Then open http://localhost/php.php with your browser. You should see something like the following:

phpinfo() result
phpinfo() result


Install and Configure MySQL

Choose Configure the MySQL server now when Setup Wizard has been completed. Choose Standard Configuration in MySQL Server Instance Configuration Wizard.

Select Standard Configuration
Select Standard Configuration


Include Bin directory in Windows PATH
Include Bin directory in Windows PATH


Choose password for root user. MySQL Server Instance Configuration will be finished with the following screen:

Finish MySQL Configuration Wizard
Finish MySQL Configuration Wizard


Install and Configure Anuko Time Tracker

Now we have everything ready to install and configure Time Tracker. Here are the installation steps:

Deploy Time Tracker Source Code

  • Remove timetracker directory and all test files inside it (C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\timetracker\).
  • Download Time Tracker distribution archive from here.
  • Extract the archive into C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\. The extraction procedure will create the timetracker directory inside htdocs.

Create Config File

Navigate to WEB-INF subdirectory in Time Tracker installation. In there, copy config.php.dist file to config.php. This is your Time Tracker configuration file.

Create 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 ttpassword then start MySQL console and issue the following commands:
C:\>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.37-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database timetracker character set = 'utf8mb4';
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.06 sec)

mysql> exit;
Bye

C:\>
Check if the database was actually created by using the "show databases;" sql statement in MySQL console:
C:\>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.1.37-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
| timetracker        |
+--------------------+
4 rows in set (0.00 sec)

mysql> exit;
Bye

C:\>
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.

Modify 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.

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?charset=utf8');

The above statement defines that Time Tracker code will access timetracker database on localhost 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.

Modify APP_NAME in config.php

Because we installed Time Tracker in timetracker subdirectory, we have to modify APP_NAME in config.php:
define('APP_NAME', 'timetracker');

Remove Database Install Script

Remove the file dbinstall.php (C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\timetracker\dbinstall.php).

Change admin Password

Use browser to access the URL below.
http://localhost/timetracker
Login to Time Tracker as admin with the password secret and change admin password. Click the Options menu item and change admin password there.

At this point Time Tracker should be ready to use. See Time Tracker User Guide.

Troubleshoot

Check your web server error log if something goes wrong and Time Tracker is not working.

Time Tracker Install Guide