]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - INSTALL
Explained first-time error msg for a system with no dbm installed.
[SourceForge/phpwiki.git] / INSTALL
1 REQUIREMENTS
2
3 PhpWiki requires a web server with PHP version 4.0.? or greater and a
4 database application.
5
6 QUICK START INSTRUCTIONS
7
8 By default PhpWiki is configured to use a flatfile database. If there
9 is no dbm on your system, you will see an error like this the first
10 time you try to use PhpWiki:
11  
12     "Fatal error: Call to undefined function: dba_open() in 
13      phpwiki/lib/DbaDatabase.php on line 32"
14
15 To correct this you will have to install a dbm package or preferably
16 an sql-compatible database such as MySQL or PostgreSQL and make the
17 necessary configuration changes to index.php.
18
19
20 Since version 1.3.0 PhpWiki uses the 'DB.php' from PEAR, a database
21 absraction layer which is part of PHP. PEAR must be installed and
22 enabled too. If PHP cannot find it's 'DB.php', the first time you try
23 to use PhpWiki you will see an error like this:
24
25     "lib/FileFinder.php:82: Fatal[256]: DB.php: file not found"
26
27 To fix this, locate the file 'DB.php' on your system, then uncomment
28 and modify the "ini_set" line in part zero of 'index.php':
29
30     ini_set('include_path', '.:/my/location/of/pear/directory');
31
32 For more information about PEAR see <http://pear.php.net/>.
33
34
35 You need the Perl regular expressions package compiled in; this is the
36 default for PHP, so you probably have it. If you don't you'll see an
37 error like "function preg_replace() not defined."
38
39
40 INSTRUCTIONS
41
42 Below are the instructions for the "out of the box" installation,
43 which uses DB files. If you are using a relational database like
44 MySQL, see the INSTALL file for your database in the 'doc/' directory
45 under the root of your PhpWiki installation.
46
47
48 0. INSTALLATION
49
50 Untar / gzip this file into the directory where you want it to
51 live. That's it.
52
53 bash$ gzip -d phpwiki-X.XX.tar.gz
54 bash$ tar -xvf phpwiki-X.XX.tar
55
56 Look at 'index.php' and edit the settings there to your liking.
57
58
59 1. CONFIGURATION
60
61 The first time you run this Wiki it will load a set of basic pages
62 from the 'pgsrc/' directory. These should be enough to get your Wiki
63 started.
64
65 PhpWiki will create some DBM files in '/tmp'. They contain the pages
66 of the live site, archived pages, and some additional information.
67
68 If you don't want the DBM files to live in '/tmp' you must make sure
69 the web server can read/write to your chosen location.  It's probably
70 a bad idea to leave it in '/tmp', so change it in 'index.php'.
71
72 WARNING: on many systems, files in '/tmp' are subject to periodic
73          removal. We very strongly advise you to move the files to
74          another directory.
75
76 For example, create a subdirectory called 'pages' in the 'phpwiki'
77 directory which was made when you untarred PhpWiki. Move the DBM files
78 there. The files should already have proper rights and owners, as they
79 were created by the web server. If not, change the permissions
80 accordingly so your web server can read / write the DBM files. Note
81 that you must be root to move files created by the web server.
82
83 Next you must ensure that the web server can access the 'pages'
84 directory and can create new files in it. For example, if your web
85 server runs as user 'nobody', give the web server access like this:
86
87 bash$ chown nobody:youraccount pages
88 bash$ chmod 755 pages
89
90 This is necessary so that the server can also create / set the
91 database lock file (PHP has a built in locking mechanism for DBM file
92 access).  Or if you're really lazy and don't worry much about
93 security:
94
95 bash$ chmod 777 pages
96
97 Note: This is insecure. The proper way is to let the directory be
98       owned by the web servers GUID and give it read and write access.
99
100
101
102 2. ALLOWING EMBEDDED HTML
103
104 (This is not working in the 1.3 branch as of this writing.)
105
106 PhpWiki ships with this feature disabled by default. According to
107 CERT, malicious users can embed HTML in your pages that allow pure
108 evil to happen:
109
110     <http://www.cert.org/advisories/CA-2000-02.html>
111
112 You can uncomment the "elseif" in 'lib/transform.php' to allow
113 embedded HTML; but you should NEVER do this if your Wiki is publically
114 accessible.
115
116
117 3. ETC
118
119 Installing PHP is beyond the scope of this document :-) You should
120 visit <http://www.php.net/> if you don't have PHP. Note that you
121 should have the web server configured to allow index.php as the root
122 document of a directory.
123
124 4. PATCHES
125
126 Post patches to:
127     <http://sourceforge.net/tracker/?func=add&group_id=6121&atid=306121>
128
129 5. BUGS
130
131 Post bugs to:
132     <http://sourceforge.net/tracker/?func=add&group_id=6121&atid=106121>
133
134 6. SUPPORT
135
136 For support from the PhpWiki team and user community post to:
137     <phpwiki-talk@lists.sourceforge.net>
138
139 You can join this list at:
140     <http://lists.sourceforge.net/lists/listinfo/phpwiki-talk>
141
142 FIN
143
144 $Id: INSTALL,v 1.15 2002-01-17 08:10:45 carstenklapp Exp $