]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - doc/INSTALL.pgsql
Allow bold, italics or underlined for numbers
[SourceForge/phpwiki.git] / doc / INSTALL.pgsql
1 NOTE: postgresql does work with phpwiki 1.2.x and 1.3.x
2
3 You might want to see http://www.sslug.dk/~chlor/phpwiki-pgsql-install.html 
4 for notes how to install it for 1.3.4 (and later)
5
6 UPGRADE FROM 1.3.11 to 1.3.12
7
8   tsearch2 is mandatory now.
9   stored procedures and referential integrity was added.
10   auto-incrementing indices were added (SERIAL INDEX)
11   The user table is deprecated now, pref is enough.
12
13   There's a special upgrade script:
14
15   bash$ psql phpwiki < /usr/share/postgresql/contrib/tsearch2.sql 
16   bash$ pgql phpwiki < schemas/psql-1_3_12.sql
17
18 ----------
19 NOTE for the 1.2 release: You may see a few warnings when you first
20 load the pages. They may look like this:
21
22 ***
23 Warning: PostgresSQL query failed: ERROR: ExecAppend: Fail to add null
24 value in not null attribute pagename in lib/pgsql.php on line 417
25
26 Inserting page ConvertSpacesToTabs, version 1 from text file
27 ***
28
29 This is not a problem since PhpWiki is trying to update a table that
30 tracks hits and links.
31 ----------
32
33 Installation instructions for PhpWiki with a Postgresql database
34
35 Installation of Postgresql will not be discussed here... you can get a
36 copy from http://www.postgresql.org/. However if you are running 
37 Red Hat Linux, all you need to do is install the PHP RPM and the 
38 Postgresql RPM and edit your Apache httpd.conf file, and uncomment 
39 the lines for all PHP files.
40
41   And BTW. add index.php to the list of directory files while you're 
42   at it... you may also need to add .php as a type handled by mod_php: 
43
44   <IfModule mod_php3.c>
45     AddType application/x-httpd-php3 .php3
46     AddType application/x-httpd-php3 .php
47     AddType application/x-httpd-php3-source .phps
48   </IfModule>
49
50   FIXME: php4
51
52   (This is from a stock 6.2 Red Hat distro, which ships with an rpm of
53   PHP 3.0.12, but should give you an idea. I had to add the line for
54   .php).
55
56 Also note that Postgresql by default has a hard limit of 8K per
57 row. This is a Really Bad Thing. You can change that when you compile
58 Postgresql to allow 32K per row, but supposedly performance
59 suffers. The 7.x release of Postgresql is supposed to fix this.
60
61 It's probably a good idea to install PhpWiki as-is first, running it
62 off DATABASE_TYPE=dba, a single DBM file. This way you can test most 
63 of the functionality of the Wiki.
64
65 Once that's done and you have the basic stuff done that's listed in 
66 the INSTALL, the time comes to move to Postgresql.
67
68 Edit config.ini for Postgresql. The lines are clearly commented and 
69 you should have no problem with this.
70
71 Next you need to create a new database, like "phpwiki".
72
73   bash$ createdb phpwiki
74
75 Now run the script schemas/psql-initialize.sql to create the tables:
76
77   bash$ psql phpwiki -f schemas/psql-initialize.sql
78
79 Newer versions of postgresql will require: 
80   bash$ pgql phpwiki < schemas/psql-initialize.sql
81
82 Since phpwiki-1.3.12 you'll need to initialize the tsearch2 module before.
83 You may want to manually inspect schemas/psql-initialize.sql and add 
84 dictionaries and stopword lists for your language.
85 See http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/
86
87   bash$ psql phpwiki < /usr/share/postgresql/contrib/tsearch2.sql 
88   bash$ pgql phpwiki < schemas/psql-initialize.sql
89
90 If the schema starts to load but then fails near the end, you might
91 need to change the user name at the top of psql-initialize.sql to
92 match that which is used by your web server; e.g. nobody, apache, or
93 www.
94
95 For some reason I had to stop/start the database so that these changes took 
96 effect.. after that just open up the Wiki in your browser and you should
97 have a brand-new PhpWiki running!
98
99 If you find something I missed, please let us know.
100 Reini Urban, Steve Wainstead <swain@panix.com>
101
102 Report bugs to phpwiki-talk@lists.sourceforge.net