Project-Id-Version: Trac 0.12
Report-Msgid-Bugs-To: trac-dev@googlegroups.com
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 <asmodai@in-nomine.org>
Language-Team: en_US <trac-dev@googlegroups.com>
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.

Changes between Version 11 and Version 12 of HowToMigratePhtagr


Ignore:
Timestamp:
03/03/12 12:18:29 (8 years ago)
Author:
sebastian
Comment:

Migration guide to 2.2b3

Legend:

Unmodified
Added
Removed
Modified
  • HowToMigratePhtagr

    v11 v12  
    2121 1. Migrate required files and directories from the old to the new phTagr 
    2222 {{{ 
    23 $ mv phtagr.old/config/core.php phtagr/config/core.php 
    24 $ mv phtagr.old/config/database.php phtagr/config/database.php 
     23$ mv phtagr.old/Config/core.php phtagr/Config/core.php 
     24$ mv phtagr.old/Config/database.php phtagr/Config/database.php 
    2525$ mv phtagr.old/users/* phtagr/users 
    2626}}} 
    2727 1. Finally migrate the database schema and call the {{{setup}}} controller. If {{{http://localhost/phtagr}}} is your gallery URL, call {{{http://localhost/phtagr/setup}}}. ''Note:'' Usually the database migration was sucessful tested and should work fine. However you never know and before anything bad happens make a database dump (e.g. with {{{mysqldump}}})! 
     28 
     29= phTagr 2.2b3 = 
     30 
     31'''phTagr 2.2b3 uses now CakePHP 2.0'''. CakePHP 2.0 is the current version of the great MVC framework and brings new fancy features towards phTagr. The downside: CakePHP 2.0 (and so phTagr) requires now at least PHP 5.2.8 and the PDO extension (PHP Data Objects). Further, the folder structure changed (again). Besides some internal changes the folder structure is now capitalized in singular. In CakePHP 1.3 folders are named {{{controllers/components}}} and in CakePHP 2.0 names are like {{{Controller/Component}}}. Further the database configuration changed slightly. If you're using git the migration is harmless. Sorry for this inconvenience but this should be the last major change for the next time.    
     32 
     33'''Following migration instruction assumes that your are running at least 2.2b2. If not, please read prior migration guide.''' 
     34 
     35== Migration using git == 
     36 
     37{{{ 
     38cd /var/www/phtagr  # change to your phtagr directory 
     39git stash  
     40git checkout cakephp-2.0  
     41git submodule sync 
     42git submodule init 
     43git submodule update 
     44git stash pop 
     45mv config/database.php Config 
     46rm -r config        # config directory should be empty 
     47}}} 
     48 
     49Continue with the database configuration migration 
     50 
     51== Migration from ZIP archive == 
     52 
     53 {{{ 
     54$ cd /var/www 
     55$ mv phtagr phtagr.old 
     56}}} 
     57 1. Fetch the [https://sourceforge.net/projects/phtagr/files/latest latest phTagr] sources from [https://sourceforge.net/projects/phtagr/ !SourceForge] and unzip it to {{{/var/www/}}} 
     58 {{{ 
     59$ wget https://sourceforge.net/projects/phtagr/files/latest 
     60$ unzip phtagr-master-XXX.zip 
     61}}} 
     62 1. Migrate required files and directories from the old to the new phTagr 
     63 {{{ 
     64$ mv phtagr.old/config/core.php phtagr/Config/core.php 
     65$ mv phtagr.old/config/database.php phtagr/Config/database.php 
     66$ mv phtagr.old/users/* phtagr/users 
     67$ mv phtagr.old/tmp/* phtagr/tmp 
     68}}} 
     69 
     70Continue with the database migration. 
     71 
     72== Migration of the database configuration ==  
     73 
     74Now we need to adapt the database configuration in {{{Config/database.php}}}. The old database configuration looks like: 
     75 
     76{{{ 
     77<?php 
     78/**  
     79 * Automatic generated database configuration file by phTagr 
     80 * 
     81 * Date: 2011-01-09 21:09:50 
     82 */ 
     83class DATABASE_CONFIG 
     84{ 
     85  var $default = array('driver' => 'mysql', 
     86                'connect' => 'mysql_connect', 
     87                'persistent' => true, 
     88                'host' => 'localhost', 
     89                'login' => 'phtagr', 
     90                'password' => 'phtagr', 
     91                'database' => 'phtagr', 
     92                'encoding' => 'utf8', 
     93                'prefix' => 'pt2_'); 
     94} 
     95?> 
     96}}} 
     97 
     98The new database configuration replaces the {{{driver}}} and {{{connect}}} settings to a single {{{datasource}}} setting and adds a test configuration: 
     99 
     100{{{ 
     101<?php 
     102/**  
     103 * Automatic generated database configuration file by phTagr 
     104 * 
     105 * Date: 2011-01-09 21:09:50 
     106 */ 
     107class DATABASE_CONFIG 
     108{ 
     109  var $default = array( 
     110                'datasource' => 'Database/Mysql', 
     111                'persistent' => true, 
     112                'host' => 'localhost', 
     113                'login' => 'phtagr', 
     114                'password' => 'phtagr', 
     115                'database' => 'phtagr', 
     116                'encoding' => 'utf8', 
     117                'prefix' => 'pt2_'); 
     118 
     119  var $test = array( 
     120                'datasource' => 'Database/Mysql', 
     121                'persistent' => true, 
     122                'host' => 'localhost', 
     123                'login' => 'phtagr', 
     124                'password' => 'phtagr', 
     125                'database' => 'phtagr', 
     126                'encoding' => 'utf8', 
     127                'prefix' => 'pt2_test_'); 
     128 
     129} 
     130?> 
     131}}} 
     132 
     133Please adapt your database configuration properly. Than phtagr should run find again! 
    28134 
    29135= phTagr prior 2.2 =