]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - INSTALL
Required PHP version 4.0.5, updated instructions for new RawHTML plugin
[SourceForge/phpwiki.git] / INSTALL
1 REQUIREMENTS
2
3 PhpWiki requires a web server with PHP version 4.0.5? or greater and a
4 database application.
5
6 (PhpWiki uses the array_search() function which is present only in PHP
7 version 4.0.5 or greater.)
8
9
10 QUICK START INSTRUCTIONS
11
12 By default PhpWiki is configured to use a flatfile database. If there
13 is no dbm on your system, you will see an error like this the first
14 time you try to use PhpWiki:
15  
16     "Fatal error: Call to undefined function: dba_open() in 
17      phpwiki/lib/DbaDatabase.php on line 32"
18
19 To correct this you will have to install a dbm package or preferably
20 an sql-compatible database such as MySQL or PostgreSQL and make the
21 necessary configuration changes to index.php.
22
23
24 Since version 1.3.0 PhpWiki uses the 'DB.php' from PEAR, a database
25 absraction layer which is part of PHP. PEAR must be installed and
26 enabled too. If PHP cannot find it's 'DB.php', the first time you try
27 to use PhpWiki you will see an error like this:
28
29     "lib/FileFinder.php:82: Fatal[256]: DB.php: file not found"
30
31 To fix this, locate the file 'DB.php' on your system, then uncomment
32 and modify the "ini_set" line in part zero of 'index.php':
33
34     ini_set('include_path', '.:/my/location/of/pear/directory');
35
36 For more information about PEAR see <http://pear.php.net/>.
37
38
39 You need the Perl regular expressions package compiled in; this is the
40 default for PHP, so you probably have it. If you don't you'll see an
41 error like "function preg_replace() not defined."
42
43
44 INSTRUCTIONS
45
46 Below are the instructions for the "out of the box" installation,
47 which uses DB files. If you are using a relational database like
48 MySQL, see the INSTALL file for your database in the 'doc/' directory
49 under the root of your PhpWiki installation.
50
51
52 0. INSTALLATION
53
54 Untar / gzip this file into the directory where you want it to
55 live. That's it.
56
57 bash$ gzip -d phpwiki-X.XX.tar.gz
58 bash$ tar -xvf phpwiki-X.XX.tar
59
60 Look at 'index.php' and edit the settings there to your liking.
61
62
63 1. CONFIGURATION
64
65 The first time you run this Wiki it will load a set of basic pages
66 from the 'pgsrc/' directory. These should be enough to get your Wiki
67 started.
68
69 PhpWiki will create some DBM files in '/tmp'. They contain the pages
70 of the live site, archived pages, and some additional information.
71
72 If you don't want the DBM files to live in '/tmp' you must make sure
73 the web server can read/write to your chosen location.  It's probably
74 a bad idea to leave it in '/tmp', so change it in 'index.php'.
75
76 WARNING: on many systems, files in '/tmp' are subject to periodic
77          removal. We very strongly advise you to move the files to
78          another directory.
79
80 For example, create a subdirectory called 'pages' in the 'phpwiki'
81 directory which was made when you untarred PhpWiki. Move the DBM files
82 there. The files should already have proper rights and owners, as they
83 were created by the web server. If not, change the permissions
84 accordingly so your web server can read / write the DBM files. Note
85 that you must be root to move files created by the web server.
86
87 Next you must ensure that the web server can access the 'pages'
88 directory and can create new files in it. For example, if your web
89 server runs as user 'nobody', give the web server access like this:
90
91 bash$ chown nobody:youraccount pages
92 bash$ chmod 755 pages
93
94 This is necessary so that the server can also create / set the
95 database lock file (PHP has a built in locking mechanism for DBM file
96 access).  Or if you're really lazy and don't worry much about
97 security:
98
99 bash$ chmod 777 pages
100
101 Note: This is insecure. The proper way is to let the directory be
102       owned by the web servers GUID and give it read and write access.
103
104
105
106 2. ALLOWING EMBEDDED HTML
107
108 PhpWiki ships with this feature disabled by default. According to
109 CERT, malicious users can embed HTML in your pages that allow pure
110 evil to happen:
111
112     <http://www.cert.org/advisories/CA-2000-02.html>
113
114 Set the ENABLE_RAW_HTML to true in 'lib/plugin/RawHtml.php' to allow
115 embedded HTML, but you should NEVER do this if your Wiki is publicly
116 accessible!
117
118 define('ENABLE_RAW_HTML', true);
119
120
121 3. ETC
122
123 Installing PHP is beyond the scope of this document :-) You should
124 visit <http://www.php.net/> if you don't have PHP. Note that you
125 should have the web server configured to allow index.php as the root
126 document of a directory.
127
128 4. PATCHES
129
130 Post patches to:
131     <http://sourceforge.net/tracker/?func=add&group_id=6121&atid=306121>
132
133 5. BUGS
134
135 Post bugs to:
136     <http://sourceforge.net/tracker/?func=add&group_id=6121&atid=106121>
137
138 6. SUPPORT
139
140 For support from the PhpWiki team and user community post to:
141     <phpwiki-talk@lists.sourceforge.net>
142
143 You can join this list at:
144     <http://lists.sourceforge.net/lists/listinfo/phpwiki-talk>
145
146 FIN
147
148 $Id: INSTALL,v 1.16 2002-02-23 23:31:19 carstenklapp Exp $