]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - doc/INSTALL.pgsql
doc update
[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 ----------
7 NOTE for the 1.2 release: You may see a few warnings when you first
8 load the pages. They may look like this:
9
10 ***
11 Warning: PostgresSQL query failed: ERROR: ExecAppend: Fail to add null
12 value in not null attribute pagename in lib/pgsql.php on line 417
13
14 Inserting page ConvertSpacesToTabs, version 1 from text file
15 ***
16
17 This is not a problem since PhpWiki is trying to update a table that
18 tracks hits and links.
19 ----------
20
21 Installation instructions for PhpWiki with a Postgresql database
22
23 Installation of Postgresql will not be discussed here... you can get a
24 copy from http://www.postgresql.org/. However if you are running 
25 Red Hat Linux, all you need to do is install the PHP RPM and the 
26 Postgresql RPM and edit your Apache httpd.conf file, and uncomment 
27 the lines for all PHP files (and add index.php to the list of directory
28 files while you're at it... you may also need to add .php as a type
29 handled by mod_php: 
30
31 <IfModule mod_php3.c>
32   AddType application/x-httpd-php3 .php3
33   AddType application/x-httpd-php3 .php
34   AddType application/x-httpd-php3-source .phps
35 </IfModule>
36
37 FIXME: php4
38
39 (This is from a stock 6.2 Red Hat distro, which ships with an rpm of
40 PHP 3.0.12, but should give you an idea. I had to add the line for
41 .php).
42
43 Also note that Postgresql by default has a hard limit of 8K per
44 row. This is a Really Bad Thing. You can change that when you compile
45 Postgresql to allow 32K per row, but supposedly performance
46 suffers. The 7.x release of Postgresql is supposed to fix this.
47
48 It's probably a good idea to install PhpWiki as-is first, running it
49 off DATABASE_TYPE=dba, a single DBM file. This way you can test most 
50 of the functionality of the Wiki.
51
52 Once that's done and you have the basic stuff done that's listed in 
53 the INSTALL, the time comes to move to Postgresql.
54
55 Edit config.ini for Postgresql. The lines are clearly commented and 
56 you should have no problem with this.
57
58 Next you need to create a new database, like "phpwiki".
59
60   bash$ createdb phpwiki
61
62 Now run the script schemas/psql-initialize.sql to create the tables:
63
64   bash$ psql phpwiki -f schemas/psql-initialize.sql
65
66 Newer versions of postgresql will require: 
67   bash$ pgql phpwiki < schemas/psql-initialize.sql
68
69 If the schema starts to load but then fails near the end, you might
70 need to change the user name at the top of psql-initialize.sql to
71 match that which is used by your web server; e.g. nobody, apache, or
72 www.
73
74 For some reason I had to stop/start the database so that these changes took 
75 effect.. after that just open up the Wiki in your browser and you should
76 have a brand-new PhpWiki running!
77
78 If you find something I missed, please let me know.
79 Steve Wainstead
80 swain@panix.com
81
82 Report bugs to phpwiki-talk@lists.sourceforge.net
83
84 $Id: INSTALL.pgsql,v 1.6 2004-12-17 09:28:40 rurban Exp $