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