]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - INSTALL
Added note at the top for users of PHP 4.0.4 or later about needing to
[SourceForge/phpwiki.git] / INSTALL
1 0. INSTALLATION
2
3 NOTE to users of PHP version 4.0.4 or later: PhpWiki will *not* work out
4 of the box as advertized; you must edit lib/config.php and set the
5 $WhichDatabase variable to "dba" since the DBM library interface has
6 changed in PHP 4.0.4.
7
8 PhpWiki requires PHP version 3.0.9 or greater, since it uses the 
9 preg_*() family of functions.
10
11 Untar/gzip this file into the directory where you want it to live.
12 That's it. To improve efficiency, edit lib/config.php and set the
13 $ServerAddress by hand; this will save a regexp call on every invocation.
14
15 bash$ gzip -d phpwiki-X.XX.tar.gz
16 bash$ tar -xvf phpwiki-X.XX.tar
17
18 Let's say you own the web server http://www.foo.com/. You untar in the
19 server's root directory; then you should be able to just go to your new
20 Wiki:
21
22 http://www.foo.com/phpwiki/index.php
23
24 If you configure your server to recognize index.php as the index of a
25 directory, you can just do:
26
27 http://www.foo.com/phpwiki/
28
29
30 1. CONFIGURATION
31
32 The first time you run this Wiki it will load a set of basic pages from
33 the pgsrc/ directory. These should be enough to get your Wiki started.
34
35 PhpWiki will create some DBM files in /tmp. They contain the pages of the
36 live site, archived pages, and some additional information.
37
38 If you don't want the DBM files to live in /tmp you must make sure the web
39 server can read/write to your chosen location.  It's probably a bad idea
40 to leave it in /tmp. (Again, edit lib/config.php). 
41
42 For example, you create a subdirectory called "pages" in the wiki
43 directory made when you untarred PhpWiki. Move the DBM files there.
44 The files are called: wikipagesdb, wikiarchivedb, wikilinksdb,
45 wikihottopicsdb, and wikihitcountdb. The files should already have proper
46 rights and owners, as they were created by the web server. Otherwise
47 change them accordingly so your web server can read/write the DBM
48 files. (Note you must be root to move files created by the web server).
49
50 Then you must ensure that the web server can access the "pages" directory
51 and can create new files in it. These can be achieved e.g. by doing
52
53 bash$ chown nobody:youraccount pages
54 bash$ chmod 755 pages
55
56 if your web server runs as user 'nobody'. This is necessary so that
57 the server can also create/set the lock file (PHP has a built in
58 locking mechanism for DBM file access).  Or if you're really lazy and
59 don't worry much about security:
60
61 bash$ chmod 777 pages
62
63 Note: this is insecure. The proper way is to let the directory be owned
64 by the web servers GUID and give it read and write access.
65
66
67
68 2. ALLOWING EMBEDDED HTML
69
70 PhpWiki ships with this featured disabled by default. According to CERT 
71 (http://www.cert.org/advisories/CA-2000-02.html) malicious users can embed
72 HTML in your pages that allow pure evil to happen. You can uncomment the 
73 "elseif" in lib/transform.php to allow embedded HTML; but you should NEVER
74 do this if your Wiki is publically accessible.
75
76
77 3. ETC
78
79 Installing PHP is beyond the scope of this document :-)
80 You should visit http://www.php.net/ if you don't have PHP.
81 Note that you should have the web server configured to allow index.php
82 as the root document of a directory.
83
84 This web application was written under PHP version 3.0.12 and 
85 the latest build of PHP4. It's tested under the following systems:
86
87 MySQL + Debian
88 mSQL + Red Hat 4.1
89 DBM or Postgresql on Red Hat 6.2
90
91 It reportedly works on Windows with Apache+PHP, which amazes me. 
92
93 That should be all. Send patches, bugs etc. to:
94
95 phpwiki-talk@lists.sourceforge.net
96
97 FIN