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