Recent Changes - Search:



Wiki help.

GTD-PHP Version 0.9 Installation Instructions


  • MySQL (4.1-4.x; or 5.x)
  • PHP (4.3.2-4.x; or 5.x), with the MySQL extension
  • A web server, such as Apache, with PHP enabled

This version supports installations using table prefixes in the database.

For current users of gtd-php 0.7 or 0.8, or users of alpha releases of 0.9, the upgrading process is straightforward.

For new users, there are OS-specific installation instructions for the following operating systems:

New installation on a Mac

  1. Set up MySQL and PHP
  2. cd ~/Sites
  3. tar -xzvf pathtotarball
  4. cd ~/Sites/gtd-php
  5. cp config.sample.php
  6. set up the database and config file

New installation on Ubuntu/Kubuntu

(Tested with Ubuntu and Kubuntu 7.10)

  1. Install the server software
    1. These instructions assume that you're going to install a minimal Apache/MySQL/PHP server; other alternative exist – such as XAMPP (also available for Solaris, Mac and Windows) -
    2. Download and install the necessary software by either the command line (sudo apt-get install ...) or Adept manager or Synaptic Package Manager the following packages:
      1. apache2
      2. php5
      3. mysql-server
      4. phpmyadmin - During the installation process, you will be asked for a my-sql password and Which server phpmyadmin should manage, choose Apache 2
  2. If you wish, you can check this has worked by going to http://localhost/apache2-default/
  3. Change the ownership of /var/www by entering at a command line: sudo chown USERNAME /var/www
  4. Download the GTD-PHP archive from //Download to the desktop
  5. Extract the archive to /var/www/ either by using either Ark or another archive package or at the command-line: tar -xvzf gtd-php-0.8.tar.gz mv gtd-php /var/www/
  6. Rename /var/www/trunk to var/www/GTD
  7. chmod all gtd-php folders to 755 and all gtd-php files to 644.
  8. If you weren't offered the option earlier - Set a root password for mysql, this root account is not the same as the operating system root password/account, by entering on the command line /usr/bin/mysqladmin -u root password NEW_PASSWORD
  9. Create a database
    1. Go to http://localhost/phpmyadmin/
    2. Login as root using the password you've just defined
    3. Create a GTD user and database by going to
      1. Privileges
      2. Create new user
      3. User login details
        1. username: GTD
        2. server:localhost
        3. password – either enter your own or generate a random one. If you're generating a random one copy and paste it into a text editor.
        4. Database for user – select Create database with same name and grant all privileges
        5. Click Go
  10. Create a
    1. Open config.sample.php with Kate, gedit or any another text editor
    2. Edit the required settings
    3. username and database is GTD
    4. password is as you entered earlier
    5. Save as
  11. Sometimes you might need to restart apache server by typing at the command line /etc/init.d/apache2 restart
  12. Complete the installation

New installation on Debian/Sarge

  1. Install packages:
         apt-get install mysql-server-4.1
         apt-get install libapache2-mod-php4
         apt-get install php4-mysql
  2. Set a root password for mysql, this root account is not the same as the operating system root password/account
    /usr/bin/mysqladmin -u root password 'enter-your-good-new-password-here'
  3. Download and install the gtd-php software
        tar -xvzf gtd-php-0.8.tar.gz
        mv gtd-php /var/www/
  4. chmod all gtd-php folders to 755 and all gtd-php files to 644.
  5. Configure apache. You may wish to use virtual hosts, but you can configure it any way you like.
  6. Make a
        cp /var/www/gtd-php/config.sample.php /var/www/gtd-php/
  7. set up the database and config file

New installation on a Windows PC

  1. Install a webserver, PHP, and MySQL. If you don't already have these, then get an all-in-one package that will set them up and configure them so that they all work nicely together. For example, WAMP.
  2. Go to your webserver contents page (e.g. C:/program files/wamp/web/), and create a new subdirectory gtdphp
  3. In that subdirectory, unzip the gtd-php package.
  4. make a copy of the config.sample.php file, and name it
  5. set up the database and config file

Setting up the MySQL database and config file for the first time

  1. In mysql create a database; you can give it any name you like; we suggest calling it gtd; you will be prompted for the mysql root password.
        mysql -u root -p -e "create database gtd"
  2. Create a MySQL user for gtd-php to run under. Note that you should also set proper mysql permissions for the mysql user. This user should not have access to other databases, nor grant privileges; this user should not be the root user. Change <user> and <password> in the line below to something else, this is the username and password for the gtd database:
        mysql -u root -p -e "grant all privileges on gtd.*
              to <user>@localhost identified by '<password>';
        flush privileges;"
  3. decide on a prefix for your installation: this will uniquely identify your GTD actions and projects. If in doubt, use the default, gtdphp_
  4. edit the file, specifying the name of your database, your MySQL user name and password, and, if you wish, change the default prefix. Use the user account created for the gtd database user, do not use the root account!
  5. Complete the installation


  1. Before upgrading, you should backup your gtd database with:
        mysqldump gtd > gtdbackup.sql
    (use this in case you need to restore)
  2. Extract the package into the same directory you originally installed gtd-php in.
  3. Copy the config.sample.php file to Copy over the config values for your database settings from config.php to
  4. Complete the installation

NB You do not need to recreate your original database: i.e., step 1 is simply a precaution.

After you've completed the installation (by browsing the install.php file), you can delete the old config.php file.

To complete the installation

  1. Check the new file, and check if you wish to change any of the default values: read the config help page
  2. Complete the installation by opening your browser, and navigating to the install.php script. This will probably be something like this: http://localhost/gtdphp/install.php
    • If you encounter a mysql error "Error connecting to database" then connect to mysql from a shell and issue:
      set password for '<user>'@'localhost' = old_password('<password>');'
      being sure to change <user> and <password> to the values in
    • For advanced users, there are several flags that change the behaviour of the installer:
      • _ALLOWUNINSTALL gives you the option of removing the gtd-php tables associated with a particular version and prefix.
      • _ALLOWUPGRADEINPLACE allows you to upgrade from an earlier version to the latest version, without changing the prefix: so that would be an upgrade in place, rather than to a new set of tables.
      • _DEBUG displays debugging text. As usual, you can use the H key to toggle its visibility
      • _DRY_RUN is set to false by default. When it's true, no MySQL statements will be executed: the installer will simply list (when _DEBUG is true) all of the commands that would have been executed.
    • If you're not upgrading in place - that is, if your $config['prefix'] does not match any existing installation prefix, you'll be offered the options of:
      • copying any existing installations with the same version number to the new prefix;
      • copying any earlier installations to the new prefix, upgrading to the latest version in the process
      • creating a new empty installation
      • creating a new installation with sample data: if you are new to gtd-php, select this option
  3. Make sure that your installation is secure
  4. Explore, enjoy, and send us comments, suggestions, gripes, donations at
  5. If you have any bugs or requests please open a new ticket for this on our trac site.

Documentation Installation Version09

Edit - History - Print - Recent Changes - Search
Page last modified on January 09, 2009, at 10:42 AM