]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - UPGRADING
Warn about zip-dump bug in 1.2.0 and 1.2.1.
[SourceForge/phpwiki.git] / UPGRADING
1 FIXME: WARNING WARNING: the schemas used by the new databases
2 are completely incompatible with schemas in any previous version
3 (i.e. before release 1.3.1 of PhpWiki).  If you install this new
4 PhpWiki, you must start with a new empty database (currently
5 either mysql, postgres or dba).  (It will be filled with the
6 usual default pages.)
7
8 FIXME: add more.
9
10 Here's an excerpt from a note I posted on phpwiki-talk with my 
11 recommendation on how to move a wiki from and older version of 
12 PhpWiki to a 1.3.x PhpWiki:
13
14 From: Jeff Dairiki <dairiki@dairiki.org>
15 Cc: phpwiki-talk@lists.sourceforge.net
16 Date: Fri, 9 Nov 2001 11:33:18 -0800
17
18 > Now, say I want to migrate all my 1.2.1 pages. I need to do a zip dump 
19 > (does the admin page let me do that?) and then.... what?
20  
21 It's still a bit of a messy process at this point.  Here's my suggestion.
22
23 1. Start 1.3.x with an empty database.  Browse the FrontPage.  This should
24 fill the wiki with the distributed default 1.3.x pgsrc.  (You've probably
25 already gotten this far.)
26
27 2. Make a zip dump of your 1.2 wiki.  If the contents of
28 PhpWikiAdministration are correct there should be a links 
29 (near the top) which will do that for you.  You need to be
30 in admin mode, though.  This means you must have set an
31 admin user and passwd in admin.php, and you should be browsing
32 through a URL like:
33   http://path.to.your/wiki/admin.php?PhpWikiAdministration
34 (If your PhpWikAdministration page is broken, then
35   http://path.to.your/wiki/admin.php?zip=all
36 should get you a zip dump.)
37
38 WARNING! WARNING! WARNING!  There is a bug in releases 1.2.0
39 and 1.2.1 of PhpWiki which results in corrupt zip dumps if
40 you are using the DBA, DBM or flat-file backends.  If you
41 are using one of those backends you should make sure to
42 fix that bug (see note below) before making the zip dump.
43
44
45 3. Now upload your zip dump to your new 1.3 wiki.  (First you need to
46 have set the admin user/passwd in the new index.php.)  You should
47 be able to use the "Upload File" form on the PhpWikiAdministration
48 page.
49
50
51 If that works, the pages from your 1.2 wiki have now overwritten
52 the 1.3 pages (though the 1.3 pages are still saved in the archive).
53 This will break a bunch of 1.3 functionality until you restore
54 the page contents.  Of the top of my head, some pages for which 
55 this will be an issue are:
56   MostPopular, RecentChanges, PhpWikiAdministration,
57   MagicPhpWikiURLs, and ReleaseNotes.
58
59 To restore these pages to the original (1.3) contents:
60
61 4a. Login as the administration user (using the SignIn button at the
62 bottom right corner of the page.)  (You need to do this because
63 some of the pages which need fixing are locked.)
64
65 4b. Browse to a page which needs restoring.  Hit the "History" button
66 (at the bottom of the page).  This should get you a list of all
67 archived versions of the page.
68
69 4c. Browse to the archive 1.3 version of the page (probably version number
70 1) by clicking on the version number of the desired version.
71
72 4d. Click the "Edit old revision" button (bottom of page).  This should
73 get you to the edit form.
74
75 4e. Click the "Save" button.  This should save the archived page contents
76 as the current contents.
77
78 We really need to figure out a way to simplify this process, but, for now,
79 that's what you gotta do.
80
81
82 An older note of mine on the same subject can be found at:
83  http://sourceforge.net/forum/message.php?msg_id=107858
84
85
86 ==========
87
88 On the zip-dump bug in 1.2.0 and 1.2.1.
89
90 There is a bug which causes PhpWiki release 1.2.0 or 1.2.1 to produce
91 corrupt zip dumps if you are using the DBA, DBM or flat-file backends.
92
93 To fix the bug, either upgrade to release 1.2.2, or patch your PhpWiki
94 source code as follows:
95
96 To Manually Patch PhpWiki 1.2.0 or 1.2.1:
97
98  1. Edit the appropriate backend driver:
99       Backend    Driver File
100       =======    ============
101       DBA        lib/dbalib.php
102       DBM        lib/dbmlib.php
103       flat file  lib/db_filesystem.php
104
105  2. Find the function definition for RetrievePage().  (Look for a file
106     which begins "function RetrievePage"...)
107
108  3. Within RetrievePage() look for the line which begins: 
109        $pagehash = unserialize(
110     (the exact arguments of unserialize depend on the backend.)
111
112  4. Immediately after that line add a line which reads:
113        $pagehash['pagename'] = $pagename;
114
115
116 $Id: UPGRADING,v 1.6 2001-11-14 17:15:42 dairiki Exp $