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