Configuration for PhpWiki config/config.ini

Using this configurator.php is experimental!

On any configuration problems, please edit the resulting config.ini manually. If one is not created, copy config-dist.ini to config.ini and edit that.

This file currently has the following issues:

Part Zero

Part Zero: Latest Development and Tricky Options

Hide options.

PHP include_path

Part Zero: Latest Development and Tricky Options If PHP needs help in finding where you installed the rest of the PhpWiki code, you can set the include_path here.

Override PHP's include path so that it can find some needed additional libraries. You shouldn't need to do this unless your system include_path esp. your system pear libs are broken or oudated. The PHPWIKI_DIR is automatically put to the front and the local lib/pear path is automatically added to the end. But if you define it, be sure to include either the system pear path or the phpwiki/lib/pear path to override your Pear_DB. Note that on Windows-based servers, you should use ; rather than : as the path separator.

INCLUDE_PATH

Input accepted.

DEBUG

Set DEBUG to 1 to view the XHTML and CSS validator icons, page processing timer, and possibly other debugging messages at the bottom of each page. 65 for a more verbose level with AUTH hints. See lib/config.php for all supported values. Default: 0

DEBUG

Input accepted.

ENABLE_EDIT_TOOLBAR

Graphical buttons on edit. Default: true

ENABLE_EDIT_TOOLBAR

JS_SEARCHREPLACE

Adds two additional buttons in EDIT_TOOLBAR, Search&Replace and Undo. Undo is experimental. Default: true

JS_SEARCHREPLACE

ENABLE_DOUBLECLICKEDIT

Edit a page by double-click into the text. This will conflict with word-selection. Note: Enable it for all users. Otherwise as per-user setting in UserPreferences. Default: false

ENABLE_DOUBLECLICKEDIT

ENABLE_WYSIWYG

Enable WYSIWYG editing. Converting back HTML to wikitext does not work in most engines. Experimental! Default: false

ENABLE_WYSIWYG

WYSIWYG_BACKEND

Which backend? Might need to be separately installed. See lib/WysiwygEdit/ Recommended is only Wikiwyg.

Default: Wikiwyg

WYSIWYG_BACKEND

WYSIWYG_DEFAULT_PAGETYPE_HTML

Store all WYSIWYG pages as HTML? Will loose most link and plugin options. Not recommended, but presented here to test several WYSIWYG backends. Default: false

WYSIWYG_DEFAULT_PAGETYPE_HTML

UPLOAD_USERDIR

Upload into separate userdirs. If enabled the generated Upload: link will include the username plus "/". This will make all uploaded links longer, but we avoid nameclashes and you see who uploaded what file. Default: true

UPLOAD_USERDIR

DISABLE_UNITS

SemanticWeb Units require the standard units executable, available in every distribution. On Windows the cygwin version works fine if e.g. the cygwin bin is in the webserver path. However if units fails, attribute comparisons will fail. Esp. getting the base unit and base values for all attributes. So you might want to disable the unit strictness at all (area:=936km^2 < 1,000,000 ?). Default: false

DISABLE_UNITS

UNITS_EXE

For a non-standard path UNITS_EXE = /usr/bin/units For Mac OS X, you need to install GNU Units http://www.gnu.org/software/units/ The units command shipped with Mac OS X will not work. Install e.g. with Homebrew: brew install gnu-units

UNITS_EXE

Input accepted.

ENABLE_OPEN_GRAPH

Needed for FacebookLike plugin Default: false

ENABLE_OPEN_GRAPH

ENABLE_SPAMASSASSIN

Needs babycart installed. Optionally define BABYCART_PATH. Default: false

ENABLE_SPAMASSASSIN

ENABLE_SPAMBLOCKLIST

Check for links to blocked external tld domains in new edits, against multi.surbl.org and bl.spamcop.net. Default: false

ENABLE_SPAMBLOCKLIST

NUM_SPAM_LINKS

If more than this number of external links appear on non-authenticated edits it will be rejected as spam. Setting NUM_SPAM_LINKS to 0 will disable the check. Default: 20

NUM_SPAM_LINKS

DISABLE_UPLOAD_ONLY_ALLOWED_EXTENSIONS

By setting DISABLE_UPLOAD_ONLY_ALLOWED_EXTENSIONS to true, you get back the old behaviour to check only *bad* extensions of uploaded files. However a server may treat other files with certain handlers, like executable scripts, so we disable now everything and enable only some extension. See lib/plugin/UpLoad.php. Default: false

DISABLE_UPLOAD_ONLY_ALLOWED_EXTENSIONS

GOOGLE_LINKS_NOFOLLOW

If GOOGLE_LINKS_NOFOLLOW is true, ref=nofollow is added to all external links to discourage spam. You might want to turn it off, if you want to improve pageranks on external links. TODO: Add ref=nofollow only for external links added by anonymous users. All internal action links do contain ref=nofollow Default: true

GOOGLE_LINKS_NOFOLLOW

ENABLE_AJAX

Aysnchronous ajax callbacks to dynamically display pages Experimental feature for plugin DynamicIncludePage, which might fail on some strictly non-conformant entities. Default: true

ENABLE_AJAX

ENABLE_DISCUSSION_LINK

Experimental WikiPedia feature: Force Discussion/Article link at the topnavbar. Default: false

ENABLE_DISCUSSION_LINK

ENABLE_CAPTCHA

If set to true, add some anti-spam countermeasures based on captcha tests. See http://www.captcha.net/ for more information on captcha. Default: false

ENABLE_CAPTCHA

USE_CAPTCHA_RANDOM_WORD

If USE_CAPTCHA_RANDOM_WORD is set to true, Captcha will use a random word, otherwise a dictionary word. Default: false

USE_CAPTCHA_RANDOM_WORD

BLOG_DEFAULT_EMPTY_PREFIX

If true don't use UserName/Blog/day/time pagenames for the ADMIN_USER, but Blog/day/time only. Convenience for a single-user blog theme. Default: true

BLOG_DEFAULT_EMPTY_PREFIX

ENABLE_SEARCHHIGHLIGHT

External Searchengine hits are detected automatically and will be highlighted in the displayed page if enabled. Optionally the actionpage SearchHighlight is also prepended, which prints a notice. Default: true

ENABLE_SEARCHHIGHLIGHT

ENABLE_MAILNOTIFY

You can disable e-mail notifications. Default: true

ENABLE_MAILNOTIFY

ENABLE_RECENTCHANGESBOX

You can enable global cached RecentChanges updates for one box, if used in your theme. Default: false

ENABLE_RECENTCHANGESBOX

ENABLE_PAGE_PUBLIC

You can enable an admin checkbox to set a "public" page attribute, to be used by external tools to generate a separate public wiki. Default: false

ENABLE_PAGE_PUBLIC

ISREADONLY

Enable this for system maintainance (e.g. read-only mount) or a general read-only database. Default: false

ISREADONLY

Part One

Part One: Authentication and security settings. See Part Three for more.

Hide options.

Wiki Name

The name of your wiki.

This is used to generate a keywords meta tag in the HTML templates, in bookmark titles for any bookmarks made to pages in your wiki, and during RSS generation for the title of the RSS channel.

To use your own logo and signature files, name them PhpWikiLogo.png and PhpWikiSignature.png and put them into themes/default/images here).

It is recommended this be a relatively short WikiWord like the InterWiki monikers found in the InterWikiMap. (For examples, see lib/interwiki.map). Default: PhpWiki WIKI_NAME = "My PhpWiki"

WIKI_NAME

Input accepted.

Admin Username

You must set this! Username and password of the administrator.

ADMIN_USER

Cannot be empty.

Admin Password

You must set this! For heaven's sake pick a good password.

If your version of PHP supports encrypted passwords, your password will be automatically encrypted within the generated config file. Use the "Create Random Password" button to create a good (random) password.

ADMIN_PASSWD is ignored on HttpAuth

ADMIN_PASSWD

Input accepted.

Encrypted Passwords

It is recommended that you use encrypted passwords to be stored in the config.ini and the users homepages metadata. You might want to use the passencrypt.php utility to encode the admin password, in the event that someone gains ftp or ssh access to the server and directory containing phpwiki.

If true, all user passwords will be stored encrypted. You might have to set it to false, if your PHP doesn't support crypt(). To use plain text passwords, in particular for the ADMIN_PASSWD, set ENCRYPTED_PASSWD to false. Default: true

ENCRYPTED_PASSWD

MAX_PAGENAME_LENGTH

Maximum length of page names. Default: 100

MAX_PAGENAME_LENGTH

Input accepted.

Reverse DNS

Visitor Hostname Lookup

If set, reverse dns lookups will be performed to attempt to convert the user's IP number into a host name, in the case where the http server does not do this. Default: true

ENABLE_REVERSE_DNS

ZIP Dump Authentication

Private ZIP Dumps of All Wiki Pages

If true, only the admin user can make zip dumps. Otherwise anyone may download all wiki pages as a single zip archive. Default: false

ZIPDUMP_AUTH

Enable RawHtml Plugin

The RawHtml plugin allows page authors to embed real, raw HTML into Wiki pages. This is a possible security threat, as much HTML (or, rather, JavaScript) can be very risky. If you are in a controlled environment, or you are using the two options below, however, it could be of use. Default: true

ENABLE_RAW_HTML

Allow RawHtml Plugin only on locked pages

If this is set, only pages locked by the Administrator may contain the RawHtml plugin Default: true

ENABLE_RAW_HTML_LOCKEDONLY

Allow RawHtml Plugin if safe HTML code

If this is set, all unsafe HTML code is stripped automatically (experimental!) See chxo.com/scripts/safe_html-test.php

ENABLE_RAW_HTML_SAFE

Maximum Upload Size

The maximum file upload size, in bytes. Default: 16777216 (16 MB)

MAX_UPLOAD_SIZE

Input accepted.

Minor Edit Timeout

If the last edit is older than MINOR_EDIT_TIMEOUT seconds, the default state for the "minor edit" checkbox on the edit page form will be off. The default, 604800, is one week (7 days): 7 * 24 * 3600

MINOR_EDIT_TIMEOUT

Input accepted.

Disabled Actions

Actions listed in this array will not be allowed. The complete list of actions can be found in lib/main.php with the function getActionDescription.

purge, remove, revert, xmlrpc, soap, upload, browse, create, diff, dumphtml, dumpserial, edit, loadfile, lock, unlock, viewsource, zip, ziphtml, ...

DISABLED_ACTIONS

Input accepted.

Moderate all Pagechanges

If you enable this option, every page is moderated by the ModeratedPage actionpage plugin. Changing a moderated page will be delayed to be granted by a moderator by email. Default: false to allow finer control.

ENABLE_MODERATEDPAGE_ALL

Access Log File

PhpWiki can generate an access_log (in "NCSA combined log" format) for you. If you want one, define this to the name of the log file. The server must have write access to the directory specified. Preferred is to use SQL access logging as below. Note that even you define ACCESS_LOG_SQL logs are written to this file also.

Default: empty - no access log file will be generated.

ACCESS_LOG

Input accepted.

Access Log SQL

PhpWiki can read and/or write mod_log_sql accesslog tables for faster abuse detection and referer lists. See http://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/#id2756178

If defined (e.g. 1) read-access is done via SQL. If flag 2 is set, phpwiki also writes. Default on SQL database. This must use DATABASE_TYPE = SQL or PDO.

ACCESS_LOG_SQL

Compress Output

By default PhpWiki will try to have PHP compress its output before sending it to the browser, if you have a recent enough version of PHP and the browser and action supports it.

Define COMPRESS_OUTPUT to false to prevent output compression. Define COMPRESS_OUTPUT to true to force output compression, even if we think your version of PHP does this in a buggy fashion. Leave it undefined to leave the choice up to PhpWiki. (Recommended)

WARNING: Compressing the output has been reported to cause problems when PHP is running on MacOSX or on redirected requests. This setting should now be correctly determined automatically.

COMPRESS_OUTPUT

HTTP Cache Control

HTTP CACHE_CONTROL

This controls how PhpWiki sets the HTTP cache control headers (Expires: and Cache-Control:)

Choose one of:

NO_CACHE
This is roughly the old (pre 1.3.4) behaviour. PhpWiki will instruct proxies and browsers never to cache PhpWiki output.
STRICT
Cached pages will be invalidated whenever the database global timestamp changes. This should behave just like NONE (modulo bugs in PhpWiki and your proxies and browsers), except that things will be slightly more efficient.
LOOSE
Cached pages will be invalidated whenever they are edited, or, if the pages include plugins, when the plugin output could conceivably have changed.

Behavior should be much like STRICT, except that sometimes wikilinks will show up as undefined (with the question mark) when in fact they refer to (recently) created pages. (Hitting your browsers reload or perhaps shift-reload button should fix the problem.)

ALLOW_STALE
Proxies and browsers will be allowed to used stale pages. (The timeout for stale pages is controlled by CACHE_CONTROL_MAX_AGE.)

This setting will result in quirky behavior. When you edit a page your changes may not show up until you shift-reload the page, etc...

This setting is generally not advisable, however it may be useful in certain cases (e.g. if your wiki gets lots of page views, and few edits by knowledgeable people who won't freak over the quirks.)

The default is currently LOOSE.

CACHE_CONTROL

HTTP Cache Control Max Age

Maximum page staleness, in seconds.

This only has effect if CACHE_CONTROL is set to ALLOW_STALE. Default: 600

CACHE_CONTROL_MAX_AGE

Input accepted.

Markup Caching

PhpWiki normally caches a preparsed version (i.e. mostly converted to HTML) of the most recent version of each page. Define WIKIDB_NOCACHE_MARKUP to true to disable the caching of marked-up page content. Note that you can also disable markup caching on a per-page temporary basis by addinging a query arg of '?nocache=1' to the URL to the page or by adding a NoCache plugin line. Use '?nocache=purge' to completely discard the cached version of the page. You can also purge the cached markup globally by using the Enable only for old php's with low memory or memory_limit=8MB. Default: false

WIKIDB_NOCACHE_MARKUP

COOKIE_EXPIRATION_DAYS

Default: 365

COOKIE_EXPIRATION_DAYS

COOKIE_DOMAIN

Default path for the wikiuser cookie. You need to specify this more explicitly if you want to enable different users on different wikis on the same host. Default: "/"

COOKIE_DOMAIN

Path for PHP Session Support

The login code now uses PHP's session support. Usually, the default configuration of PHP is to store the session state information in servers where each server has their own distinct /tmp (this is the case on SourceForge's project web server.) You can specify an alternate directory in which to store state information like so in this directory)

On USE_DB_SESSION = true you can ignore this.

SESSION_SAVE_PATH

Input accepted.

Force PHP Database Sessions

On USE_DB_SESSION = true or false you can force the behaviour how to transport session data.

USE_DB_SESSION

Part Two

Part Two: Database Configuration

Hide options.

Database Type

Select the database backend type:

Default: dba

DATABASE_TYPE

SQL DSN Setup

For SQL based backends, specify the database as a DSN The most general form of a DSN looks like:

  phptype(dbsyntax)://username:password@protocol+hostspec/database?option=value

For a MySQL database, the following should work:

   mysqli://user:password@host/databasename

To connect over a Unix socket, use something like

   mysqli://user:password@unix(/path/to/socket)/databasename
  DATABASE_DSN = mysqli://guest@:/var/lib/mysql/mysql.sock/phpwiki
  DATABASE_DSN = mysqli://guest@localhost/phpwiki
  DATABASE_DSN = pgsql://localhost/user_phpwiki
 Not editable.

SQL Type

SQL DB types. The DSN hosttype.

SQL User

SQL User Id:

Input accepted.

SQL Password

SQL Password:

Input accepted.

SQL Database Host

SQL Database Hostname:

To connect over a local named socket, use something like

  unix(/var/lib/mysql/mysql.sock)

here. mysql on Windows via named pipes might need 127.0.0.1

Input accepted.

SQL Database Name

SQL Database Name:

Input accepted.

SQL dsn

Calculated from the settings above:

 DATABASE_DSN
Not editable.
mysqli://guest@unix(/var/lib/mysql/mysql.sock)/test

Filename / Table name Prefix

Used by all DB types:

Prefix for filenames or table names, e.g. "phpwiki_"

Currently you MUST EDIT THE SQL file too! (in the schemas/ directory because we aren't doing on the fly sql generation during the installation.

Note: This prefix is NOT prepended to the default DBAUTH_ tables user, pref and member!

DATABASE_PREFIX

Input accepted.

DATABASE_PERSISTENT

Keep persistent connections: Recommended is false for bigger servers, and true for small servers with not so many connections. postgresql: Please leave it false. Should really be set as database option in the DSN above. Default: false

DATABASE_PERSISTENT

DB Session table

Tablename to store session information. Only supported by SQL backends.

A word of warning - any prefix defined above will be prepended to whatever is given here.

DATABASE_SESSION_TABLE

Input accepted.

dba directory

For the file and dba backends, this specifies where the data files will be located. Ensure that the user that the webserver runs as has write access to this directory.

WARNING: leaving this as the default of '/tmp' will almost guarantee that you'll lose your wiki data at some stage. Default: /tmp

DATABASE_DIRECTORY

Input accepted.

dba handler

Use 'gdbm', 'dbm', 'db2', 'db3' or 'db4' depending on your DBA handler methods supported:
cdb, cdb_make, db4, inifile, flatfile, qdbm, lmdb

Better not use other hacks such as inifile, flatfile or cdb

DATABASE_DBA_HANDLER

dba timeout

Recommended values are 10-20 seconds. The more load the server has, the higher the timeout.

DATABASE_TIMEOUT

Input accepted.

DATABASE_OPTIMISE_FREQUENCY

How often to try and optimise the database. Specified in seconds. Set to 0 to disable optimisation completely. Default is 50 (seconds).

This is a fairly crude way of doing things as it requires a page save to occur during the right minute for the optimisation to be triggered.

With most modern databases (eg. Postgres) and distributions (eg. Debian) the system maintenance scripts take care of this nightly, so you will want to set this parameter to 0 (disabled). Default: 50

DATABASE_OPTIMISE_FREQUENCY

Input accepted.

Part Three

Part Three: (optional) Basic User Authentication Setup

Hide options.

Publicly viewable

If ALLOW_ANON_USER is false, you have to login before viewing any page or doing any other action on a page.

ALLOW_ANON_USER

Allow anonymous edit

If ALLOW_ANON_EDIT is false, you have to login before editing or changing any page. See below.

ALLOW_ANON_EDIT

Allow Bogo Login

If ALLOW_BOGO_LOGIN is false, you may not login with any wikiword username and empty password. If true, users are allowed to create themselves with any WikiWord username. See below.

ALLOW_BOGO_LOGIN

Allow User Passwords

If ALLOW_USER_PASSWORDS is true, the authentication settings below define where and how to check against given username/passwords. For completely security disable BOGO_LOGIN and ANON_EDIT above.

ALLOW_USER_PASSWORDS

User Authentication Methods

Many different methods can be used to check user's passwords. Try any of these in the given order:

BogoLogin
WikiWord username, with no *actual* password checking, although the user will still have to enter one.
PersonalPage
Store passwords in the users homepage metadata (simple)
Db
Use DBAUTH_AUTH_* (see below) with PearDB only.
LDAP
Authenticate against LDAP_AUTH_HOST with LDAP_BASE_DN.
IMAP
Authenticate against IMAP_AUTH_HOST (email account)
POP3
Authenticate against POP3_AUTH_HOST (email account)
Session
Get username and level from a PHP session variable. (e.g. for FusionForge)
File
Store username:crypted-passwords in .htaccess like files. Use Apache's htpasswd to manage this file.
HttpAuth
Use the protection by the webserver (.htaccess/.htpasswd) (experimental) Enforcing HTTP Auth not yet. Note that the ADMIN_USER should exist also. Using HttpAuth disables all other methods and no userauth sessions are used.

Several of these methods can be used together, in the manner specified by USER_AUTH_POLICY, below. To specify multiple authentication methods, separate the name of each one with colons.

  USER_AUTH_ORDER = 'PersonalPage : Db'
  USER_AUTH_ORDER = 'BogoLogin : PersonalPage'
USER_AUTH_ORDER

Input accepted.

ENABLE_AUTH_OPENID

Enable/Disable additional OpenID Authentification. See http://openid.net/ Default: false

ENABLE_AUTH_OPENID

PASSWORD_LENGTH_MINIMUM

For "security" purposes, you can specify that a password be at least a certain number of characters long. This applies even to the BogoLogin method. Default: 0 (to allow immediate passwordless BogoLogin)

PASSWORD_LENGTH_MINIMUM

Input accepted.

USER_AUTH_POLICY

The following policies are available for user authentication:

first-only
use only the first method in USER_AUTH_ORDER
old
ignore USER_AUTH_ORDER and try to use all available methods as in the previous PhpWiki releases (slow)
strict
check if the user exists for all methods: on the first existing user, try the password. dont try the other methods on failure then
stacked
check the given user - password combination for all methods and return true on the first success.
USER_AUTH_POLICY

ENABLE_PAGEPERM

Use access control lists (as in Solaris and Windows NTFS) per page and group, not per user for the whole wiki.

We suspect ACL page permissions to degrade speed by 10%. GROUP_METHOD=WIKIPAGE is slowest. Default: true

ENABLE_PAGEPERM

Part Three A

Part Three A: (optional) Group Membership

Hide options.

Group membership

Group membership. PhpWiki supports defining permissions for a group as well as for individual users. This defines how group membership information is obtained. Supported values are:

"NONE"
Disable group membership (Fastest). Note the required quoting.
WIKIPAGE
Define groups as list at "CategoryGroup". (Slowest, but easiest to maintain)
DB
Stored in an SQL database. Optionally external. See USERS/GROUPS queries
FILE
Flatfile. See AUTH_GROUP_FILE below.
LDAP
LDAP groups. See "LDAP authentication options" above and lib/WikiGroup.php. (experimental)
GROUP_METHOD

CATEGORY_GROUP_PAGE

If GROUP_METHOD = WIKIPAGE:

Page where all groups are listed.

CATEGORY_GROUP_PAGE

Input accepted.

AUTH_GROUP_FILE

For GROUP_METHOD = FILE, the file given below is referenced to obtain group membership information. It should be in the same format as the standard unix /etc/groups(5) file.

AUTH_GROUP_FILE

Input accepted.

Part Three B

Part Three B: (optional) External database authentication and authorization.

If USER_AUTH_ORDER includes Db, or GROUP_METHOD = DB, the options listed below define the SQL queries used to obtain the information out of the database, and (optionally) store the information back to the DB.

Hide options.

DBAUTH_AUTH_DSN

A database DSN to connect to. Defaults to the DSN specified for the Wiki as a whole.

DBAUTH_AUTH_DSN

Input accepted.

User Exists Query

USER/PASSWORD queries:

For USER_AUTH_POLICY=strict and the Db method is required

DBAUTH_AUTH_USER_EXISTS

Input accepted.

Check Query

Check to see if the supplied username/password pair is OK

Plaintext passwords: (DBAUTH_AUTH_CRYPT_METHOD = plain)
DBAUTH_AUTH_CHECK = "SELECT IF(passwd='$password',1,0) AS ok FROM user WHERE userid='$userid'"

database-hashed passwords (more secure):
DBAUTH_AUTH_CHECK = "SELECT IF(passwd=PASSWORD('$password'),1,0) AS ok FROM user WHERE userid='$userid'"

DBAUTH_AUTH_CHECK

Input accepted.

Crypt Method

If you want to use Unix crypt()ed passwords, you can use DBAUTH_AUTH_CHECK to get the password out of the database with a simple SELECT query, and specify DBAUTH_AUTH_USER_EXISTS and DBAUTH_AUTH_CRYPT_METHOD:

DBAUTH_AUTH_CHECK = "SELECT passwd FROM user where userid='$userid'"
DBAUTH_AUTH_CRYPT_METHOD = crypt

DBAUTH_AUTH_CRYPT_METHOD

Update the user's authentication credential

If this is not defined but DBAUTH_AUTH_CHECK is, then the user will be unable to update their password.

Plaintext passwords:
DBAUTH_AUTH_UPDATE = "UPDATE user SET passwd='$password' WHERE userid='$userid'"
Database-hashed passwords:
DBAUTH_AUTH_UPDATE = "UPDATE user SET passwd=PASSWORD('$password') WHERE userid='$userid'"

DBAUTH_AUTH_UPDATE

Input accepted.

Allow the user to create their own account

If this is empty, Db users cannot subscribe by their own.

DBAUTH_AUTH_CREATE

Input accepted.

USER/PREFERENCE queries

If you choose to store your preferences in an external database, enable the following queries. Note that if you choose to store user preferences in the 'user' table, only registered users get their prefs from the database, self-created users do not. Better to use the special 'pref' table.

The prefs field stores the serialized form of the user's preferences array, to ease the complication of storage.

  DBAUTH_PREF_SELECT = "SELECT prefs FROM user WHERE userid='$userid'"
  DBAUTH_PREF_SELECT = "SELECT prefs FROM pref WHERE userid='$userid'"
DBAUTH_PREF_SELECT

Input accepted.

Update the user's preferences

Note that REPLACE works only with mysql and destroy all other columns!

Mysql: DBAUTH_PREF_UPDATE = "REPLACE INTO pref SET prefs='$pref_blob',userid='$userid'"

DBAUTH_PREF_UPDATE

Input accepted.

Create new user's preferences

Define this if new user can be create by themselves.

DBAUTH_PREF_INSERT

Input accepted.

USERS/GROUPS queries

You can define 1:n or n:m user<=>group relations, as you wish.

Sample configurations:

only one group per user (1:n):
DBAUTH_IS_MEMBER = "SELECT user FROM user WHERE user='$userid' AND group='$groupname'"
DBAUTH_GROUP_MEMBERS = "SELECT user FROM user WHERE group='$groupname'"
DBAUTH_USER_GROUPS = "SELECT group FROM user WHERE user='$userid'"
multiple groups per user (n:m):
DBAUTH_IS_MEMBER = "SELECT userid FROM member WHERE userid='$userid' AND groupname='$groupname'"
DBAUTH_GROUP_MEMBERS = "SELECT DISTINCT userid FROM member WHERE groupname='$groupname'"
DBAUTH_USER_GROUPS = "SELECT groupname FROM member WHERE userid='$userid'"

DBAUTH_IS_MEMBER

Input accepted.

DBAUTH_GROUP_MEMBERS

DBAUTH_GROUP_MEMBERS

Input accepted.

DBAUTH_USER_GROUPS

DBAUTH_USER_GROUPS

Input accepted.

LDAP AUTH Host

If USER_AUTH_ORDER contains Ldap:

The LDAP server to connect to. Can either be a hostname, or a complete URL to the server (useful if you want to use ldaps or specify a different port number).

LDAP_AUTH_HOST

Input accepted.

LDAP BASE DN

The organizational or domain BASE DN: e.g. "dc=mydomain,dc=com".

Note: ou=Users and ou=Groups are used for GroupLdap Membership Better use LDAP_OU_USERS and LDAP_OU_GROUP with GROUP_METHOD=LDAP.

LDAP_BASE_DN

Input accepted.

LDAP SET OPTION

Some LDAP servers need some more options, such as the Windows Active Directory Server. Specify the options (as allowed by the PHP LDAP module) and their values as NAME=value pairs separated by colons.

LDAP_SET_OPTION

Input accepted.

LDAP AUTH USER

DN to initially bind to the LDAP server as. This is needed if the server doesn't allow anonymous queries. (Windows Active Directory Server)

LDAP_AUTH_USER

Input accepted.

LDAP AUTH PASSWORD

Password to use to initially bind to the LDAP server, as the DN specified in the LDAP_AUTH_USER option (above).

LDAP_AUTH_PASSWORD

Input accepted.

LDAP SEARCH FIELD

If you want to match usernames against an attribute other than uid, specify it here. Default: uid

e.g.: LDAP_SEARCH_FIELD = sAMAccountName

LDAP_SEARCH_FIELD

Input accepted.

LDAP SEARCH FILTER

If you want to check against special attributes, such as external partner, employee status. Default: undefined. This overrides LDAP_SEARCH_FIELD. Example (&(uid=$userid)(employeeType=y)(myCompany=My Company*)(!(myCompany=My Company Partner*)))

LDAP_SEARCH_FILTER

Input accepted.

LDAP OU USERS

If you have an organizational unit for all users, define it here. This narrows the search, and is needed for LDAP group membership (if GROUP_METHOD=LDAP) Default: ou=Users

LDAP_OU_USERS

Input accepted.

LDAP OU GROUP

If you have an organizational unit for all groups, define it here. This narrows the search, and is needed for LDAP group membership (if GROUP_METHOD=LDAP) The entries in this ou must have a gidNumber and cn attribute. Default: ou=Groups

LDAP_OU_GROUP

Input accepted.

IMAP Auth Host

If USER_AUTH_ORDER contains IMAP:

The IMAP server to check usernames from. Defaults to localhost.

Some IMAP_AUTH_HOST samples: localhost, localhost:143/imap/notls, localhost:993/imap/ssl/novalidate-cert (SuSE refuses non-SSL conections)

IMAP_AUTH_HOST

Input accepted.

POP3 Authentication

If USER_AUTH_ORDER contains POP3:

The POP3 mail server to check usernames and passwords against.

POP3_AUTH_HOST

Input accepted.

File Authentication

If USER_AUTH_ORDER contains File:

File to read for authentication information. Popular choices are /etc/shadow and /etc/httpd/.htpasswd

AUTH_USER_FILE

Input accepted.

File Storable?

Defines whether the user is able to change their own password via PHPWiki. Note that this means that the webserver user must be able to write to the file specified in AUTH_USER_FILE. Default: false

AUTH_USER_FILE_STORABLE

Session Auth USER

If USER_AUTH_ORDER contains Session:

Name of the session variable which holds the already authenticated username. Sample: 'userid', 'user[username]', 'user->username'

AUTH_SESS_USER

Input accepted.

Session Auth LEVEL

Which level will the user be? 1 = Bogo or 2 = Pass

AUTH_SESS_LEVEL

Input accepted.

Part Four

Part Four: Page appearance and layout

Hide options.

Theme

THEME

Most of the page appearance is controlled by files in the theme subdirectory.

There are a number of pre-defined themes shipped with PhpWiki. Or you may create your own, deriving from existing ones.

  THEME = Sidebar (default)
  THEME = default
  THEME = MacOSX
  THEME = MonoBook (WikiPedia)
  THEME = smaller
  THEME = Wordpress
  THEME = Portland
  THEME = Crao
  THEME = wikilens (with Ratings)
  THEME = Hawaiian
  THEME = SpaceWiki
  THEME = Hawaiian
  THEME = blog     (Kubrick)   [experimental]
THEME

Language

Select your language/locale - default language is "en" for English. Other languages available:

English  "en" (English    - HomePage)
German   "de" (Deutsch    - StartSeite)
French   "fr" (Français   - PageAccueil)
Dutch    "nl" (Nederlands - ThuisPagina)
Spanish  "es" (Español    - PáginaPrincipal)
Swedish  "sv" (Svenska    - Framsida)
Italian  "it" (Italiano   - PaginaPrincipale)
Japanese "ja" (Japanese   - ホームページ)
Chinese  "zh" (Chinese    - 首頁)

If you set DEFAULT_LANGUAGE to the empty string, your systems default language (as determined by the applicable environment variables) will be used.

DEFAULT_LANGUAGE

Wiki Page Source

WIKI_PGSRC -- specifies the source for the initial page contents of the Wiki. The setting of WIKI_PGSRC only has effect when the wiki is accessed for the first time (or after clearing the database.) WIKI_PGSRC can either name a directory or a zip file. In either case WIKI_PGSRC is scanned for files -- one file per page.

// Default (old) behavior:
define('WIKI_PGSRC', 'pgsrc');
// New style:
define('WIKI_PGSRC', 'wiki.zip');
define('WIKI_PGSRC',
       '../Logs/Hamwiki/hamwiki-20010830.zip');
WIKI_PGSRC

Input accepted.

Default Wiki Page Source

DEFAULT_WIKI_PGSRC is only used when the language is *not* the default (English) and when reading from a directory: in that case some English pages are inserted into the wiki as well. DEFAULT_WIKI_PGSRC defines where the English pages reside.

DEFAULT_WIKI_PGSRC

Input accepted.

Generic Pages

These are ':'-separated pages which will get loaded untranslated from DEFAULT_WIKI_PGSRC.

$DEFAULT_WIKI_PAGES

Input accepted.

Part Five

Part Five: Mark-up options

Hide options.

Allowed Protocols

Allowed protocols for links - be careful not to allow "javascript:" URL of these types will be automatically linked. within a named link [name|uri] one more protocol is defined: phpwiki

ALLOWED_PROTOCOLS

Input accepted.

Inline Images

URLs ending with the following extension should be inlined as images. Specify as per ALLOWED_PROTOCOLS. Note that you can now also allow class|svg|svgz|vrml..., which will create embedded object instead of img. Typical CGI extensions as pl or cgi maybe allowed too, but those two will be enforced to img. Default: "png|jpg|jpeg|gif"

INLINE_IMAGES

Input accepted.

WikiName Regexp

Perl regexp for WikiNames ("bumpy words") (?<!..) & (?!...) used instead of '\b' because \b matches '_' as well

WIKI_NAME_REGEXP

Input accepted.

InterWiki Map File

InterWiki linking -- wiki-style links to other wikis on the web

The map will be taken from a page name InterWikiMap. If that page is not found (or is not locked), or map data cannot be found in it, then the file specified by INTERWIKI_MAP_FILE (if any) will be used.

INTERWIKI_MAP_FILE

Input accepted.

WARN_NONPUBLIC_INTERWIKIMAP

Display a warning if the internal lib/interwiki.map is used, and not the public InterWikiMap page. This file is not readable from outside. Default: false

WARN_NONPUBLIC_INTERWIKIMAP

Keyword Link Regexp

Search term used for automatic page classification by keyword extraction.

Any links on a page to pages whose names match this search will be used keywords in the keywords HTML meta tag. This is an aid to classification by search engines. The value of the match is used as the keyword.

The default behavior is to match Category* or Topic* links.

KEYWORDS

Input accepted.

Author and Copyright Site Navigation Links

These will be inserted as <link rel> tags in the HTML header of every page, for search engines and for browsers like Mozilla which take advantage of link rel site navigation.

If you have your own copyright and contact information pages change these as appropriate.

COPYRIGHTPAGE_TITLE

Input accepted.

COPYRIGHTPAGE URL

Other useful alternatives to consider:

 COPYRIGHTPAGE_TITLE = "GNU Free Documentation License"
 COPYRIGHTPAGE_URL = "https://www.gnu.org/copyleft/fdl.html"
 COPYRIGHTPAGE_TITLE = "Creative Commons Attribution 2.0 Generic"
 COPYRIGHTPAGE_URL = "https://creativecommons.org/licenses/by/2.0/"

See https://creativecommons.org/learn/licenses/ for variations

COPYRIGHTPAGE_URL

Input accepted.

AUTHORPAGE_TITLE

Default Author Names

AUTHORPAGE_TITLE

Input accepted.

AUTHORPAGE_URL

Default Author URL

AUTHORPAGE_URL

Input accepted.

TOC_FULL_SYNTAX

Allow full markup in headers to be parsed by the CreateToc plugin.

If false you may not use WikiWords or [] links or any other markup in headers in pages with the CreateToc plugin. But if false the parsing is faster and more stable. Default: true

TOC_FULL_SYNTAX

ENABLE_MARKUP_COLOR

If false the %color=... %% syntax will be disabled. Default: true

ENABLE_MARKUP_COLOR

DISABLE_MARKUP_WIKIWORD

Disable automatic linking of camelcase (wiki-)words to pages. Internal page links must be forced with [[pagename]] then. Default: false

DISABLE_MARKUP_WIKIWORD

ENABLE_MARKUP_DIVSPAN

Enable "div" and "span" HTML blocks and attributes. Experimental. Default: false

ENABLE_MARKUP_DIVSPAN

Part Six

Part Six (optional): URL options -- you can probably skip this section.

For a pretty wiki (no index.php in the url) set a separate DATA_PATH.

Hide options.

Server Name

Canonical name of the server on which this PhpWiki resides.

SERVER_NAME

Input accepted.

Server Port

Canonical httpd port of the server on which this PhpWiki resides.

SERVER_PORT

Input accepted.

Server Protocol

https needs a special setting

SERVER_PROTOCOL

Script Name

Relative URL (from the server root) of the PhpWiki script.

SCRIPT_NAME

Input accepted.

Data Path

URL of the PhpWiki install directory. (You only need to set this if you've moved index.php out of the install directory.) This can be either a relative URL (from the directory where the top-level PhpWiki script is) or an absolute one.

DATA_PATH

Input accepted.

PhpWiki Install Directory

Path to the PhpWiki install directory. This is the local filesystem counterpart to DATA_PATH. (If you have to set DATA_PATH, your probably have to set this as well.) This can be either an absolute path, or a relative path interpreted from the directory where the top-level PhpWiki script (normally index.php) resides.

PHPWIKI_DIR

Input accepted.

Use PATH_INFO

PhpWiki will try to use short urls to pages, eg http://www.example.com/index.php/HomePage If you want to use urls like http://www.example.com/index.php?pagename=HomePage then define 'USE_PATH_INFO' as false by uncommenting the line below. NB: If you are using Apache >= 2.0.30, then you may need to to use the directive "AcceptPathInfo On" in your Apache configuration file (or in an appropriate <.htaccess> file) for the short urls to work: See https://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo

Default: PhpWiki will try to divine whether use of PATH_INFO is supported in by your webserver/PHP configuration, and will use PATH_INFO if it thinks that is possible.

USE_PATH_INFO

Virtual Path

VIRTUAL_PATH is the canonical URL path under which your your wiki appears. Normally this is the same as dirname(SCRIPT_NAME), however using e.g. separate starter scripts, apaches mod_actions (or mod_rewrite), you can make it something different.

If you do this, you should set VIRTUAL_PATH here or in the starter scripts.

E.g. your phpwiki might be installed at at /scripts/phpwiki/index.php, but you've made it accessible through eg. /wiki/HomePage.

One way to do this is to create a directory named 'wiki' in your server root. The directory contains only one file: an .htaccess file which reads something like:

    Action x-phpwiki-page /scripts/phpwiki/index.php
    SetHandler x-phpwiki-page
    DirectoryIndex /scripts/phpwiki/index.php

In that case you should set VIRTUAL_PATH to '/wiki'.

(VIRTUAL_PATH is only used if USE_PATH_INFO is true.)

VIRTUAL_PATH

Input accepted.

TEMP_DIR

In case your system has no idea about /tmp, TEMP or TMPDIR, better provide it here. E.g. needed for zipdumps.

TEMP_DIR

Input accepted.

Allowed Load

List of directories from which it is allowed to load pages. Directories are separated with ":"

ALLOWED_LOAD

Input accepted.

Part Seven

Part Seven:

Miscellaneous settings

Hide options.

Strict Mailable Pagedumps

If you define this to true, (MIME-type) page-dumps (either zip dumps, or "dumps to directory" will be encoded using the quoted-printable encoding. If you're actually thinking of mailing the raw page dumps, then this might be useful, since (among other things,) it ensures that all lines in the message body are under 80 characters in length.

Also, setting this will cause a few additional mail headers to be generated, so that the resulting dumps are valid RFC 2822 e-mail messages.

Probably you can just leave this set to false, in which case you get raw ('binary' content-encoding) page dumps. Default: false

STRICT_MAILABLE_PAGEDUMPS

Default local Dump Directory

Here you can change the default dump directories.

DEFAULT_DUMP_DIR

Input accepted.

Default local HTML Dump Directory

Here you can change the default dump directories.

HTML_DUMP_DIR

Input accepted.

HTML Dump Filename Suffix

Filename suffix used for XHTML page dumps. If you don't want any suffix just comment this out.

HTML_DUMP_SUFFIX

Input accepted.

Disable GETIMAGESIZE

If you get a crash at loading LinkIcons you might want to disable the getimagesize() function, which crashes on certain php versions and and some external images (png's, ..).

getimagesize() is only needed for spam prevention.

Per default too small ploaded or external images are not displayed, to prevent from external 1 pixel spam. Default: true

DISABLE_GETIMAGESIZE

TOOLBAR_PAGELINK_PULLDOWN

Add additional EDIT_TOOLBAR buttons if defined: They need some time and memory. Insert a pagelink from this list:

TOOLBAR_PAGELINK_PULLDOWN

TOOLBAR_TEMPLATE_PULLDOWN

Insert a template from this list:

TOOLBAR_TEMPLATE_PULLDOWN

Input accepted.

TOOLBAR_IMAGE_PULLDOWN

Insert an already uploaded image: Default: true

TOOLBAR_IMAGE_PULLDOWN

Input accepted.

FULLTEXTSEARCH_STOPLIST

Overide the default localized stoplist.

FULLTEXTSEARCH_STOPLIST

Input accepted.

Part Seven A

Part Seven A:

Optional Plugin Settings and external executables

Hide options.

FORTUNE_DIR

Enable random quotes from a fortune directory when adding a new page. Usually at /usr/share/fortune or /usr/share/games/fortune If empty no quotes are inserted.

FORTUNE_DIR

Input accepted.

USE_EXTERNAL_HTML2PDF

On action=pdf or format=pdf External PDF executable, %s is the xhtml filename

USE_EXTERNAL_HTML2PDF

Input accepted.

EXTERNAL_HTML2PDF_PAGELIST

On format=pdf with pagelist actionpages. The multifile variant: book (with index and toc) or webpage format Default: "htmldoc --quiet --webpage --format pdf14"

EXTERNAL_HTML2PDF_PAGELIST

Input accepted.

BABYCART_PATH

Optional: SPAMASSASSIN wrapper. Only used if ENABLE_SPAMASSASSIN = true http://www.cynistar.net/~apthorpe/code/babycart/babycart.html Default: /usr/local/bin/babycart

BABYCART_PATH

Input accepted.

GOOGLE_LICENSE_KEY

GoogleMaps and GooglePlugin For using the Google API and GoogleMaps http://www.google.com/apis/maps/signup.html

GOOGLE_LICENSE_KEY

Input accepted.

ENABLE_RATEIT

RateIt widget. Can be enabled in Sidebar theme. Default: false

ENABLE_RATEIT

RATEIT_IMGPREFIX

RateIt widget. Can be enabled in Sidebar theme. Default: false style of the stars: empty = yellow, red or red

RATEIT_IMGPREFIX

Input accepted.

GRAPHVIZ_EXE

GraphViz plugin executable: http://www.graphviz.org/

GRAPHVIZ_EXE

Input accepted.

TTFONT

Default GD2 truetype font. For text2png, GraphViz, VisualWiki You might need the full path to the .ttf file

TTFONT

Input accepted.

VISUALWIKIFONT

VisualWiki Plugin needs graphviz Replaced by TTFONT

VISUALWIKIFONT

Input accepted.

VISUALWIKI_ALLOWOPTIONS

Disable user options

VISUALWIKI_ALLOWOPTIONS

PLOTICUS_EXE

PloticusPlugin executable and prefabs path: http://ploticus.sourceforge.net/doc/welcome.html

PLOTICUS_EXE

Input accepted.

PLOTICUS_PREFABS

PloticusPlugin executable and prefabs path: http://ploticus.sourceforge.net/doc/welcome.html

PLOTICUS_PREFABS

Input accepted.

MY_JABBER_ID

JabberPresence http://edgar.netflint.net/howto.php

MY_JABBER_ID

Input accepted.

Part Eight

Part Eight:

Cached Plugin Settings. (pear Cache)

Hide options.

pear Cache USECACHE

Enable or disable pear caching of plugins.

PLUGIN_CACHED_USECACHE

pear Cache Database Container

Curently only file is supported. db, trifile and imgfile might be supported, but you must hack that by yourself.

PLUGIN_CACHED_DATABASE

pear Cache cache directory

Should be writable to the webserver.

PLUGIN_CACHED_CACHE_DIR

Input accepted.

pear Cache Filename Prefix

This is only used if database is set to file. The webserver must have write access to this dir! Every file name in the cache begins with this prefix Default: phpwiki

PLUGIN_CACHED_FILENAME_PREFIX

Input accepted.

pear Cache HIGHWATER

Garbage collection parameter.

PLUGIN_CACHED_HIGHWATER

Input accepted.

pear Cache LOWWATER

Garbage collection parameter.

PLUGIN_CACHED_LOWWATER

Input accepted.

pear Cache MAXLIFETIME

Garbage collection parameter.

PLUGIN_CACHED_MAXLIFETIME

Input accepted.

pear Cache MAXARGLEN

max. generated url length.

PLUGIN_CACHED_MAXARGLEN

Input accepted.

pear Cache FORCE_SYNCMAP

Will prevent image creation for an image map 'on demand'. It is a good idea to set this to 'true' because it will also prevent the html part not to fit to the image of the map. If you don't use a cache, you have to set it to 'false', maps will not work otherwise but strange effects may happen if the output of an image map producing WikiPlugin is not completely determined by its parameters.

PLUGIN_CACHED_FORCE_SYNCMAP

pear Cache IMGTYPES

Handle those image types via GD handles. Check your GD supported image types.

PLUGIN_CACHED_IMGTYPES

Input accepted.