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