]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - UPGRADING
Allow bold, italics or underlined for numbers
[SourceForge/phpwiki.git] / UPGRADING
1 To migrate to a new phpwiki installation you might want to backup your old pages 
2 (best via a zip dump), configure your new installation, and restore the old 
3 pages in PhpWikiAdministration. 
4 UPGRADING from 1.3.7 on requires just ?action=upgrade.
5
6 Can't unpack bad cached markup. Probably php_zlib extension not loaded.
7 =======================================================================
8 Sign in as ADMIN_USER, go to PhpWikiAdministration#Purge_Markup_Cache
9 and click on the [Purge Cache] button.
10
11 ?action=upgrade
12 ===============
13 To upgrade default pages, the database and some config settings 
14 add "?action=upgrade" to your HomePage url and press "Enter", which will
15 do most of the upgrades automatically.
16
17 You might need to enter the DBADMIN_USER and DBADMIN_PASSWD in 
18 config/config.ini for SQL databases and default permissions.
19
20 The importer looks at the Date header of the page. In your current wikidb 
21 against the creation date of the pgsrc, you want to import.
22 If you changed your pages after I changed the pgsrc pages, 
23 they will not be upgraded.
24
25 Or just upgrade your configuration as described below.
26
27 UPGRADING since 1.3.11
28 ======================
29 ?action=upgrade should be enough.
30
31 UPGRADING since 1.3.10
32 ======================
33 ?action=upgrade should be enough.
34
35 UPGRADING from 1.3.9
36 ======================
37 At first you have to manually create a config/config.ini based on 
38 config-dist.ini and your previous index.php. We don't have a script,
39 to do that automatically.
40
41 mysql:
42   ALTER TABLE page CHANGE id id INT NOT NULL AUTO_INCREMENT;
43 NOTE: ?action=upgrade does this also, if your mysql user has the 
44 ALTER permissions or DBADMIN_USER and DBADMIN_PASSWD are set.
45
46 UPGRADING from 1.3.7
47 ======================
48 mysql + postgres:
49   ALTER TABLE session ADD sess_ip CHAR(15) NOT NULL;
50   CREATE INDEX sess_date ON session (sess_date); 
51
52 postgres:
53   New pref and session tables have been added for more 
54   efficiency.
55
56 user and themes:
57
58 WikiUser and signin.tmpl changed from $user->getId() to 
59 $user->getAuthenticatedId()
60 Authenticated reflects the level (confirmed by password), 
61 Signed just the username (possibly by cookie only)
62
63 pgsrc:
64
65 To upgrade not-existing pages add "?action=upgrade" to 
66 your HomePage url and press "Enter", which will
67 add all fresh pages from pgsrc to your pageset.
68 If you deleted some pages on purpose, you'll have to removed 
69 them again with PhpWikiAdminisstration/Remove then.
70
71 There's no smart "Merge Diffs" yet to upgrade existing docs,
72 this will come with the next release. Also upgrading the
73 database automatically.
74
75 UPGRADING from 1.2.x
76 ======================
77 FIXME: WARNING WARNING: The schemas used by the new databases
78 are completely incompatible with schemas in any previous version
79 (i.e. before release 1.3.1 of PhpWiki).  If you install this new
80 PhpWiki, you must start with a new empty database (currently
81 either mysql, postgres or dba).  (It will be filled with the
82 usual default pages.)
83
84 FIXME: add more.
85
86 Here's an excerpt from a note I posted on phpwiki-talk with my 
87 recommendation on how to move a wiki from and older version of 
88 PhpWiki to a 1.3.x PhpWiki:
89
90 From: Jeff Dairiki <dairiki@dairiki.org>
91 Cc: phpwiki-talk@lists.sourceforge.net
92 Date: Fri, 9 Nov 2001 11:33:18 -0800
93
94 > Now, say I want to migrate all my 1.2.1 pages. I need to do a zip dump 
95 > (does the admin page let me do that?) and then.... what?
96  
97 It's still a bit of a messy process at this point.  Here's my suggestion.
98
99 1. Start 1.3.x with an empty database.  Browse the FrontPage.  This should
100 fill the wiki with the distributed default 1.3.x pgsrc.  (You've probably
101 already gotten this far.)
102
103 2. Make a zip dump of your 1.2 wiki.  If the contents of
104 PhpWikiAdministration are correct there should be a links 
105 (near the top) which will do that for you.  You need to be
106 in admin mode, though.  This means you must have set an
107 admin user and passwd in admin.php, and you should be browsing
108 through a URL like:
109   http://path.to.your/wiki/admin.php?PhpWikiAdministration
110 (If your PhpWikAdministration page is broken, then
111   http://path.to.your/wiki/admin.php?zip=all
112 should get you a zip dump.)
113
114 WARNING! WARNING! WARNING!  There is a bug in releases 1.2.0
115 and 1.2.1 of PhpWiki which results in corrupt zip dumps if
116 you are using the DBA, DBM or flat-file backends.  If you
117 are using one of those backends you should make sure to
118 fix that bug (see note below) before making the zip dump.
119
120
121 3. Now upload your zip dump to your new 1.3 wiki.  (First you need to
122 have set the admin user/passwd in the new index.php.)  You should
123 be able to use the "Upload File" form on the PhpWikiAdministration
124 page.
125
126
127 If that works, the pages from your 1.2 wiki have now overwritten
128 the 1.3 pages (though the 1.3 pages are still saved in the archive).
129 This will break a bunch of 1.3 functionality until you restore
130 the page contents.  Of the top of my head, some pages for which 
131 this will be an issue are:
132   MostPopular, RecentChanges, PhpWikiAdministration,
133   MagicPhpWikiURLs, and ReleaseNotes.
134
135 To restore these pages to the original (1.3) contents:
136
137 4a. Login as the administration user (using the SignIn button at the
138 bottom right corner of the page.)  (You need to do this because
139 some of the pages which need fixing are locked.)
140
141 4b. Browse to a page which needs restoring.  Hit the "History" button
142 (at the bottom of the page).  This should get you a list of all
143 archived versions of the page.
144
145 4c. Browse to the archive 1.3 version of the page (probably version 
146 number 1) by clicking on the version number of the desired version.
147
148 4d. Click the "Edit old revision" button (bottom of page).  This should
149 get you to the edit form.
150
151 4e. Click the "Save" button.  This should save the archived page contents
152 as the current contents.
153
154 We really need to figure out a way to simplify this process, but, for now,
155 that's what you gotta do.
156
157 An older note on the same subject can be found at:
158   http://sourceforge.net/forum/message.php?msg_id=107858