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