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