]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - INSTALL
Update document about supported PHP versions
[SourceForge/phpwiki.git] / INSTALL
1 REQUIREMENTS
2
3 PhpWiki requires a web server with at least PHP version 4.3.10.
4 PhpWiki was tested with 4.4.7 (centos4), 4.3.10, 4.4.9, 5.0.3,
5 5.1.6 (centos5), 5.2.10, 5.3, 6.0.
6
7 All users of PHP are strongly encouraged to upgrade to PHP 5.2.13
8 or PHP 5.3.2 that are the supported versions.
9 Visit <http://www.php.net> for downloads and information.
10
11 You need the Perl regular expressions package compiled in; this is the
12 default for PHP, so you probably have it. If you don't you'll see an
13 error like "function preg_replace() not defined."
14
15 PHP must also be compiled with support for the type of database you
16 want to use, i.e. --with-gdbm, --with-db2, --with-db3, --with-msql,
17 --with-pgsql. (With PHP4 MySQL support is always enabled. With PHP5
18 sqlite instead). Consult the PHP installation manual for specific
19 installation and configure options.
20 <http://www.php.net/manual/en/installation.php>
21
22 Since version 1.3.0 PhpWiki uses the 'DB.php' from PEAR, a database
23 abstraction layer which is part of PHP. PhpWiki version 1.3.3 and later
24 includes the necessary PEAR libraries and will use it if your system
25 PEAR library can not be found. For more information about PEAR
26 see <http://pear.php.net/>.
27 PhpWiki version 1.3.7 and later includes the ADODB libraries and will
28 use it for DATABASE_TYPE=ADODB. ADODB has more features, can use yet
29 unsupported backends out of the box, and this is where SQL development
30 happens. ADODB improvements are then backported to the stable PEAR
31 backend (which often suffers from bad upstream PEAR libraries) and to
32 PDO for php5.
33
34
35 QUICK START INSTRUCTIONS
36
37 Copy 'config/config-dist.ini' to 'config/config.ini' and edit the
38 settings in 'config/config.ini' to your liking.
39
40 By default PhpWiki is configured to use a dba database. If there
41 is no dba on your system, you will see an error like this the first
42 time you try to use PhpWiki:
43
44     "Fatal error: Call to undefined function: dba_open() in
45      phpwiki/lib/DbaDatabase.php on line 32"
46
47 To correct this you will have to check the available dba handlers
48 (default: db3 for Windows, otherwise gdbm), install the dba extension
49 or preferably an sql-compatible database such as MySQL or PostgreSQL
50 and make the necessary configuration changes to 'lib/config/config.ini'.
51
52
53 INSTRUCTIONS
54
55 Below are the instructions for the "out of the box" installation,
56 which uses DB files. If you are using a relational database like
57 MySQL, see the INSTALL file for your database in the 'doc/' directory
58 under the root of your PhpWiki installation.
59
60
61 0. INSTALLATION
62
63 Untar / gzip this file into the directory where you want it to
64 live. That's it.
65
66 bash$ gzip -d phpwiki-X.XX.tar.gz
67 bash$ tar -xvf phpwiki-X.XX.tar
68
69 In the config subdirectory copy 'config-dist.ini' to 'config.ini' and
70 edit the settings in 'config.ini' to your liking.
71
72
73 1. CONFIGURATION
74
75 The first time you run this Wiki it will load a set of basic pages
76 from the 'pgsrc/' directory. These should be enough to get your Wiki
77 started.
78
79 PhpWiki will create some DBA files in '/tmp'. They contain the pages
80 of the live site, archived pages, and some additional information.
81
82 If you don't want the DBA files to live in '/tmp' you must make sure
83 the web server can read/write to your chosen location.  It's probably
84 a bad idea to leave it in '/tmp', so change it in 'config/config.ini'.
85
86 WARNING: On many systems, files in '/tmp' are subject to periodic
87          removal. We very strongly advise you to move the files to
88          another directory.
89
90 For example, create a subdirectory called 'pages' in the 'phpwiki'
91 directory which was made when you untarred PhpWiki. Move the DBA files
92 there. The files should already have proper rights and owners, as they
93 were created by the web server. If not, change the permissions
94 accordingly so your web server can read / write the DBA files. Note
95 that you must be root to move files created by the web server.
96
97 Next you must ensure that the web server can access the 'pages'
98 directory and can create new files in it. For example, if your web
99 server runs as user 'nobody', give the web server access like this:
100
101 bash$ chown nobody:youraccount pages
102 bash$ chmod 755 pages
103
104 This is necessary so that the server can also create / set the
105 database lock file (PHP has a built in locking mechanism for DBA file
106 access).  Or if you're really lazy and don't worry much about
107 security:
108
109 bash$ chmod 777 pages
110
111 Note: This is insecure. The proper way is to let the directory be
112       owned by the web servers GUID and give it read and write access.
113
114
115 2. ALLOWING EMBEDDED HTML
116
117 PhpWiki ships with this feature disabled by default. According to
118 CERT, malicious users can embed HTML in your pages that allow pure
119 evil to happen:
120
121     <http://www.cert.org/advisories/CA-2000-02.html>
122
123 Set the ENABLE_RAW_HTML to true in 'config/config.ini' to allow
124 embedded HTML, but you should NEVER do this if your Wiki is publicly
125 accessible!
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$