Project-Id-Version: Trac 0.12
POT-Creation-Date: 2008-01-30 09:20+0100
PO-Revision-Date: 2010-07-19 23:05+0200
Last-Translator: Jeroen Ruigrok van der Werven <>
Language-Team: en_US <>
Plural-Forms: nplurals=2; plural=(n != 1)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Generated-By: Babel 0.9.6

Warning: Can't synchronize with repository "(default)" (Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? ). Look in the Trac log for more information.

Version 23 (modified by sebastian, 8 years ago) (diff)

Fix unzip command of zip archive

This installation procedure describes the server version with a system wide installation on a LAMP system. After installing the required software phTagr must be initialized which is described in SetupProcedure. Please read the SoftwareRequirements before installing!

The given installation examples are based in on Ubuntu 10.04 but works similar on other system, too.

You are not an Web admin and want to install phTagr anyway? See also:

Prepare LAMP

Most likey you have already installed your LAMP with apache, mySQL and PHP. But if not, here are the required commands to install your first LAMP!

Note: Apache should run with enabled mod_rewrite. It not see

Install LAMP

$ sudo apt-get install apache2 libapache2-mod-php5 php5-mysql php5-gd php5-cli mysql-server mysql-client

Enable Apache2's rewrite module:

$ cd /etc/apache2/mods-enabled/
$ sudo ln -s ../mods-available/rewrite.load

To allow overwrites by .htaccess files edit /etc/apache2/sites-enabled/000-default and change section of <Directory /var/www/>: Change AllowOverride None to AllowOverride All. The section should look like:

    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all

Now reload the configuration of Apache2.

$ sudo /etc/init.d/apache2 reload

(Optional:) Install external Programms

phTagr runs fine on a simple LAMP. However it can do more with some external helper programs:

  • Exiftool is used to write back the MetaData to the image files like tags, categories, locations, date and geolocations. So all tags are saved within your photos an can be used by other programs! Without exiftool, only import (read) of MetaData is supported.
  • FFmpeg is used to convert video files (AVI, MPEG, MOV) to flash videos. It is also used to create video thumbnails. Without ffmpeg phTagr can handle only flash movies. See also CreateFlashVideo
  • ImageMagick is used alternativly to the GD library to create image previews.
  • flvtool2 is used for creating better flash movies with cuepoint. This tool is really optional

You can install these programs with following command:

$ sudo apt-get install ffmpeg flvtool2 imagemagick libimage-exiftool-perl

Creating the database

Next we have to create a database which phTagr needs to store information:

$ sudo mysql -u root
mysql> CREATE DATABASE phtagr;
mysql> GRANT ALL ON phtagr.* TO 'phtagr'@'localhost' IDENTIFIED BY 'secretpassword';
mysql> quit

Download and prepare phTagr

Download the latest version as ZIP archive from SourceForge (which is around 3.2 MB). This includes the cakePHP MVC framework and phTagr Gallery.

cd /var/www
sudo wget 
sudo unzip

Now your folder structure looks like this:

    /cake        <-- CakePHP framework
    /app         <-- phTagr as CakePHP's default application
        /config  <-- Basic configuration path
            /core.php      <-- Basic core configuration file
            /database.php  <-- Database configuration file (can be created automatically)
        /users   <-- Directory of your user's files, photos, videos, cached previews, ...
        /tmp     <-- Directory for log files, cache files, ...
        /webroot <-- Directory of public files like javascript, css, images

Now we need to make some folders accessible for the web server

$ cd phtagr/app
$ sudo chown -R www-data config users tmp

Open now phtagr in your browser http://localhost/phtagr, which should open the setup page. Continue with the SetupProcedure.

If you don't see anything you might have a problem with apaches redirection. Please see

[From cakePHP's book] If you don't want or can't get mod_rewrite (or some other compatible module) up and running on your server, you'll need to use Cake's built in pretty URLs. In /app/config/core.php, uncomment the line that looks like:

Configure::write('App.baseUrl', env('SCRIPT_NAME'));

Now you should be able to open http://localhost/phtagr/app/webroot/index.php/setup and continue with the SetupProcedure.

Warning: If your rewrite does not work, the files of the users are not protected and are readable by the world! You should move phtagr's files to another location, copy the webroot to /var/www as phtagr and configure properly the settings in its index.php.

Please help us to make phtagr more popular Tell friends about it, add links to your blog or bookmark system, add your gallery to PhtagrInTheWild - read HowToHelp for more details