Also available in ((../Deutsch/Konfiguration Deutsch)), ((../Français/Configuration Française)), ((../Русский/ФайлКонфигурации Русский))
for !!(green)**WackoWiki R6.3.2**!!
{{toc numerate=1}}
%%(info type="note")
This page documents the configuration of WackoWiki **R6.3.2** (constant ##WACKO_VERSION## in ##config/constants.php##).
The configuration is split in two parts:
* **Primary settings** — written by the installer into ##config/config.php##. Only these 17 keys belong there.
* **Secondary settings** — stored in the ##config## table of the database (##<table_prefix>config##, columns ##config_name## / ##config_value##). They can be changed in the ((AdminPanel)) or directly in the table.
The built-in defaults are defined in ##config/config_defaults.php##. **Do not edit that file** — it is used only when ##config/config.php## is absent.
Constants are defined in ##config/constants.php##.
%%
===configuration files===
* ##config/config.php## — primary (mandatory) settings, written by the installer. Should not be writable after installation (##chmod 640##).
* ##config/config_defaults.php## — built-in defaults. Do not edit.
* ##config/constants.php## — constants of the system (paths, limits, versions).
* ##config/antispam.conf## — word list of the spam filter, edited in the Admin Panel → Filter.
* ##config/csp.conf##, ##config/csp_custom.conf## — Content Security Policy header.
* ##config/permissions_policy.conf##, ##config/permissions_policy_custom.conf## — Permissions-Policy header.
* ##config/interwiki.conf## — list of the InterWiki addresses (##{{interwikilist}}##).
* ##config/lock##, ##config/lock_ap## — lock files that block the site / the Admin Panel during maintenance.
%%(wacko wrapper="shade")
Changes in the secondary config can be done in two ways:
1. editing the ##config_value## in the ##config## table, e.g. via phpMyAdmin.
* #|
*|config_name | config_value|*
||news_cluster |News ||
|#
* Don't forget to delete the config cache (##_cache/config/##) afterwards, e.g. via ##{{admincache}}##
1. the **((AdminPanel Admin panel))**
%%
===primary settings===
These are the only settings written to ##config/config.php## (see ##setup/write-config.php##).
##'base_url' => 'https://example.com/wiki/',##
- the complete address (URL) where the wiki is located.
- must end with a slash, page names are appended to it.
- a relative value (##'/wiki/'##) may be used if the wiki is called locally or over an internal name; the installer fills this value in automatically from the server environment.
- not stored in the config table — it is a primary setting only.
##'db_driver' => 'mysqli',##
- database driver name → database PHP extension name.
* ##mysqli## → ##mysqli## (recommended)
* ##mysql_pdo## → ##pdo_mysql##
* ##sqlite_pdo## → ##pdo_sqlite##
* ##sqlite## → ##sqlite3##
- the legacy value ##mysqli_legacy## is automatically converted to ##mysqli##.
- during an upgrade the engine cannot be switched between SQLite and MariaDB/MySQL.
##'db_charset' => 'utf8mb4',##
- client character set of the database connection. ##utf8mb4## is the only offered value.
##'db_collation' => 'utf8mb4_unicode_520_ci',##
- collation used to determine the sort order of the ##ORDER BY## clause.
* ##0## — replaced by the default ##utf8mb4_unicode_520_ci## when the configuration file is written.
* a ((https://mariadb.com/kb/en/supported-character-sets-and-collations/ MariaDB collation))
* a ((https://dev.mysql.com/doc/refman/8.0/en/charset-collation-names.html MySQL collation))
- for SQLite the value is empty.
##'db_engine' => 'InnoDB',##
- preferred database engine. ##InnoDB## is the only offered value.
- for SQLite the value is set to ##SQLite3##.
##'db_vendor' => 'mysql',##
- ##mariadb## or ##mysql##; used to distinguish incompatible session SQL modes.
- the built-in default is ##mysql##; the installer offers MariaDB as the first (default) choice.
##'db_host' => 'localhost',##
- the host on which the database server runs (usually ##localhost## or ##127.0.0.1##).
- not used for SQLite.
##'db_port' => '3306',##
- port of the database server; for MySQL/MariaDB the default ##3306## is used when the value is empty.
- not used for SQLite.
##'db_name' => 'wacko',##
- the name of the database.
- for SQLite this is the path to the database file; the data directory must **not** be reachable via the web.
##'db_user' => 'db_user',##
- the name of the database user.
##'db_password' => 'mypassword',##
- password of the database user.
##'sql_mode' => '0',##
- SQL mode of the database session.
* ##0## — server (default, uses the server setting)
* ##1## — session lax (##SQL_MODE_LAX##)
* ##2## — session strict (##SQL_MODE_STRICT##, includes ##ONLY_FULL_GROUP_BY##)
- not applicable to SQLite.
##'table_prefix' => 'wacko_',##
- prefix of all database tables; allows several wikis in one database.
- for SQLite the prefix is always empty.
##'system_seed' => '12345678901234567890',##
- system seed; the installer generates a random 20 character token.
- it is used to derive the hash of the password reset codes, the permalinks (##{{hashid}}##) and the recovery password. Changing it invalidates the pending password reset links.
##'hashid_seed' => '12345678901234567890',##
- seed for the permalink generation with the ##{{hashid}}## action; the installer generates a random 20 character token.
- changing it invalidates all previously generated permalinks.
##'recovery_password' => '',##
- contains the password hash for the recovery password, which can be generated with the action ##{{admin_recovery}}## (administrator rights required).
- the recovery password is needed to log in to the ((AdminPanel admin panel)) if no administrator account is available.
- without a specified password hash (or with a changed ##system_seed##) the access to the admin panel is not possible.
##'wacko_version' => '6.3.2',##
- WackoWiki version (do not change, this should only be changed by upgrading the WackoWiki software!). The value is taken from the constant ##WACKO_VERSION##.
===secondary settings===
Stored in the ##config## table of the database. All the following values are the built-in defaults from ##config/config_defaults.php## and can be changed in the corresponding module of the ((AdminPanel)).
====Basic settings (Admin Panel → Basic)====
##'site_name' => 'MyWikiSite',##
- the name of the wiki site; it appears in the browser title, in the theme header, in e-mail notifications, etc.
- the default subject prefix of notification e-mails is derived from this value (##email_subject_prefix##).
##'site_desc' => 'Cover what you do best. Link to the rest.',##
- short description of the site; it supplements the title in the page header.
##'admin_name' => 'WikiAdmin',##
- WikiName of the administrator of the site; it is used for the login to the wiki.
- the name does not determine access rights, but it should match the name of the chief administrator.
##'language' => 'en',##
- default language of the interface and of the messages shown to guests: ##ru## — Russian, ##en## — English, ##fr## — French, and so on.
##'multilanguage' => 0,##
- allows selecting the language on a page-by-page basis.
* ##0## — disabled (default)
* ##1## — enabled
##'allowed_languages' => 0,##
- list of the languages that may be used, comma-separated (e.g. ##en,de,fr##).
- ##0## — all available languages are allowed.
##'enable_comments' => 1,##
- comments on pages.
* ##0## — off (comments are disabled for the whole site)
* ##1## — on for everybody
* ##2## — on for registered users only
##'comments_offset' => 0,##
- which comment page is shown by default.
* ##0## — first page
* ##1## — last page
##'sorting_comments' => 0,##
- order of the comments.
* ##0## — ascending (oldest first)
* ##1## — descending (newest first)
##'footer_comments' => 1,##
- display of the comments panel at the bottom of a page.
* ##0## — off · ##1## — on · ##2## — on for registered users only
##'footer_files' => 1,##
- display of the attachments panel at the bottom of a page.
* ##0## — off · ##1## — on · ##2## — on for registered users only
##'footer_tags' => 1,##
- display of the tags panel at the bottom of a page.
* ##0## — off · ##1## — on · ##2## — on for registered users only
##'wikiedit_toolbar' => [...],##
- list of the buttons of the editor toolbar (stored as JSON in the config table).
- the full default list is stored in the constant ##TB_DEFAULT## (##config/constants.php##).
##'show_permalink' => 0,##
- display of the permalink of the current version of a page (##{{hashid}}##).
* ##0## — off · ##1## — on · ##2## — on for registered users only
##'hide_toc' => 0,##
- display of the table of contents panel.
* ##0## — on (the panel is shown) · ##1## — off
##'hide_index' => 0,##
- display of the panel of adjacent pages.
* ##0## — on (the panel is shown) · ##1## — off
##'tree_level' => 1,##
- which subpages are displayed in the index panel.
* ##0## — full index · ##1## — only lower (subpages) · ##2## — only upper (neighbours)
##'sticky_toc' => 0,##
- master switch of the sticky sidebar table of contents.
* ##0## — off · ##1## — on
##'sticky_toc_neighbours' => 5,##
- number of items shown above/below the active entry (##0## — show all).
##'sticky_toc_min' => 2,##
- minimum number of headings before the sidebar appears.
##'sticky_toc_comments' => 1,##
- include the headings of the comments in the sticky ToC.
* ##0## — off · ##1## — on
##'menu_items' => 5,##
- default number of the shown menu (bookmark) items.
##'hide_revisions' => 0,##
- display of the revisions of a page.
* ##0## — off · ##1## — on for registered users · ##2## — on for everybody
##'attachments_handler' => 2,##
- permits the display of the attachments handler.
* ##0## — off · ##1## — on · ##2## — on for registered users
##'source_handler' => 1,##
- permits the display of the source handler.
* ##0## — off · ##1## — on · ##2## — on for registered users
##'export_handler' => 2,##
- permits the display of the XML export handler (##export.xml##).
* ##0## — off · ##1## — on · ##2## — on for registered users
##'diff_modes' => '0,1,2,3,4,5',##
- list of the diff modes the user may choose, comma-separated.
* ##0## — full diff · ##2## — source · ##3## — side by side · ##4## — inline · ##5## — merged · ##6## — unified · ##7## — context
- it is recommended to select only the set of modes really needed.
##'default_diff_mode' => 3,##
- preselected diff mode (##3## — side by side).
##'notify_diff_mode' => 2,##
- diff mode used in the body of the notification e-mails; only the text/plain modes ##2## (source), ##6## (unified) and ##7## (context) are offered.
##'edit_summary' => 0,##
- change summary (edit note) in the edit mode.
* ##0## — disabled (default) · ##1## — enabled · ##2## — mandatory
##'minor_edit' => 0,##
- minor edit option in the edit mode.
* ##0## — disabled (default) · ##1## — enabled
##'section_edit' => 1,##
- section editing: each headline starts a new section and a small edit link appears next to the headline.
* ##0## — disabled · ##1## — enabled (default)
##'review' => 0,##
- review option in the edit mode (pages must be approved by a reviewer).
* ##0## — off · ##1## — on
##'publish_anonymously' => 0,##
- allows users to publish anonymously (to hide the name).
* ##0## — off · ##1## — on
##'default_rename_redirect' => 0,##
- when a page is renamed, create a redirect from the old name.
* ##0## — no (default) · ##1## — yes
##'store_deleted_pages' => 1,##
- keeps deleted pages, revisions and files in a special section for review and recovery.
* ##0## — no · ##1## — yes (default)
##'keep_deleted_time' => 0,##
- storage time of the deleted pages in days; it only makes sense together with ##store_deleted_pages##.
* ##0## — unlimited (default) · ##1## — one day · ##90## — 90 days, etc.
##'pages_purge_time' => 0,##
- storage time of the page history (revisions) in days.
* ##0## — unlimited (default) · ##1## — one day · ##90## — 90 days, etc.
##'enable_referrers' => 0,##
- permits the creation and the display of the external referrers.
* ##0## — off · ##1## — on · ##2## — on for administrators
##'referrers_purge_time' => 1,##
- storage time of the referring external pages in days.
* ##0## — unlimited · ##1## — one day (default) · ##90## — 90 days, etc.
##'enable_counters' => 1,##
- per page hit counters and the display of the simple statistics. The views of the page owner are not counted.
* ##0## — off · ##1## — on (default)
====System settings (Admin Panel → System)====
##'debug' => 0,##
- debugging mode; hardly necessary for standard users, mainly useful for developers.
* ##0## — debugging is off · ##1## — only the total execution time · ##2## — full time · ##3## — full detail (DBMS, cache, etc.)
- the full detail mode requires considerably more memory.
##'debug_sql_threshold' => 0,##
- in the detailed debug mode report only the queries that take longer than the given number of seconds (e.g. ##0.01##).
##'debug_admin_only' => 0,##
- show the debug data only for the administrator.
* ##0## — disabled · ##1## — enabled
##'cache' => 0,##
- caches the rendered pages in ##_cache/page##, which speeds up the subsequent requests.
* ##0## — disabled (useful for development) · ##1## — enabled
- only valid for unregistered visitors; the cache is purged with ##{{admincache}}##.
##'cache_ttl' => 600,##
- time to live of the cached pages in seconds (default 10 min).
##'cache_sql' => 0,##
- maintains a local cache of the results of certain SQL queries in ##_cache/query##.
* ##0## — off (default) · ##1## — on
##'cache_sql_ttl' => 600,##
- time to live of the cached SQL query results in seconds.
* ##600## — 10 min (default) · ##1200## — 20 min (suggested maximum); larger values are not desirable.
##'log_level' => 0,##
- minimum priority of the events that are recorded in the log.
* ##0## — no journal · ##1## — only the critical level: admin action, object deletion, suspected hacking attempt
* ##2## — from the highest level: locking, ACL change, unsuccessful user login
* ##3## — from high: page renaming/moving/splitting/merging, user password change/reminder, successful user login
* ##4## — medium: page creation (settings change), file upload, PM sending, user registration and e-mail activation, page ownership claim
* ##5## — low: comment posting, user logout
* ##6## — the minimum level: page edit, user settings update
* ##7## — record all (debugging)
##'log_default_show' => 1,##
- minimum priority of the events displayed in the log by default.
* ##1## — only the critical level · ##2## — from the highest level · ##3## — from high level · ##4## — average · ##5## — from low · ##6## — from the minimum level · ##7## — show all
##'log_purge_time' => 0,##
- remove the log entries after the given number of days (##0## — keep forever).
##'anonymize_ip' => 0,##
- anonymize the IP addresses where applicable (page, revision, referrers).
* ##0## — off · ##1## — on
##'reverse_proxy' => 0,##
- determine the IP address of the remote client from the ##X-Forwarded-For## headers.
* ##0## — disabled (default) · ##1## — enabled
- enable this option only if the wiki really runs behind a reverse proxy.
##'reverse_proxy_header' => '',##
- name of the header that carries the client IP, if it is not ##X-Forwarded-For## (the header value is a comma separated list; only the last, left-most entry is used).
##'reverse_proxy_addresses' => '',##
- comma separated list of the IP addresses of your own reverse proxies; the ##X-Forwarded-For## information is trusted only if the request comes from one of these addresses.
##'session_store' => 1,##
- where the session data is stored.
* ##1## — file (default) · ##2## — database
- SQLite supports file sessions only.
##'session_notice' => 0,##
- display of the cause of the session termination.
* ##0## — off · ##1## — on · ##2## — on for administrators
##'login_notice' => 0,##
- display of the welcome-back notice.
* ##0## — off · ##1## — on
##'rewrite_mode' => 1,##
- "short, beautiful URLs"; only possible if the server is configured with mod_rewrite (in ##httpd.conf## or via ##.htaccess##).
* ##0## — off · ##1## — on
- the default value depends on the detection of the rewrite extension at install time; the value may be overwritten at runtime by the settings class.
====Permissions settings (Admin Panel → Permissions)====
##'default_read_acl' => '*',##
- default right for reading a page.
* ##*## — everybody (public wiki) · ##$## — registered users only (private wiki)
##'default_write_acl' => '$',##
- default right for writing a page (recording modifications).
##'default_comment_acl' => '$',##
- default right for leaving comments on a page.
##'default_create_acl' => '$',##
- default right for creating new (sub)pages.
##'default_upload_acl' => 'Admins',##
- default right for uploading files to a page.
##'rename_global_acl' => 'Admins',##
- permission to rename an entire cluster (all sub-pages).
* ##Admins## — only administrators may rename the whole cluster
* ##0## — not possible · ##1## — any registered user, unless he is the owner of the page, may rename the whole cluster
##'acl_lock' => 0,##
- overwrites the ACL settings of all pages to read only; useful to close the editing for a period of time or as an emergency response to an exploit.
* ##0## — off · ##1## — on
##'hide_locked' => 1,##
- hide the pages the user has no access to in the page lists (the link in the text stays visible).
* ##0## — no, all pages are displayed, a lock (or a key) marks the restricted ones · ##1## — yes (default)
##'remove_onlyadmins' => 0,##
- only administrators may delete pages.
* ##0## — off · ##1## — on
##'owners_can_remove_comments' => 1,##
- allow the page owners to moderate the comments on their own pages.
* ##0## — off · ##1## — on (default)
##'categories_handler' => 1,##
- who may modify the category list of a page.
* ##0## — administrators · ##1## — the owner of the page (default) · ##2## — every registered user
##'moders_can_edit' => 3,##
- human moderation expiration in days: moderators may only edit comments that were created no more than this number of days ago (the last comment of a topic is not affected).
====Security settings (Admin Panel → Security)====
##'allow_registration' => 0,##
- open user registration via the ##{{registration}}## form.
* ##0## — off (default); the administrator can still create users · ##1## — on
##'approve_new_user' => 0,##
- new users must be approved by an administrator before they can log in.
* ##0## — off · ##1## — on
##'allow_persistent_cookie' => 1,##
- allow persistent ("remember me") cookies.
* ##0## — off · ##1## — on (default)
##'disable_wikiname' => 1,##
- disable the mandatory WikiName (CamelCase) format of the user names; permits registration with traditional nicknames.
* ##0## — WikiName required · ##1## — disabled (default)
##'username_chars_min' => 3,##
- minimum number of characters in a user name.
##'username_chars_max' => 20,##
- maximum number of characters in a user name.
##'allow_email_reuse' => 0,##
- different users may register with the same e-mail address.
* ##0## — off (default) · ##1## — on
##'email_confirmation' => 0,##
- the user must verify the e-mail address before the first login.
* ##0## — off · ##1## — on
##'allowed_email_domains' => '',##
- comma separated list of the allowed e-mail domains (e.g. ##example.com, local.lan##); if empty, all domains are allowed.
##'forbidden_email_domains' => '',##
- comma separated list of the forbidden e-mail domains; only effective if the list of the allowed domains is empty.
##'enable_captcha' => 1,##
- show the captcha in the cases listed below (or when a security threshold is reached).
* ##0## — off · ##1## — on
##'captcha_new_comment' => 1,##
- captcha for new comments (unregistered users).
##'captcha_new_page' => 1,##
- captcha for new pages (unregistered users).
##'captcha_edit_page' => 1,##
- captcha for editing pages (unregistered users).
##'captcha_registration' => 1,##
- captcha for the registration form.
##'tls' => 0,##
- use a TLS-secured connection; it also determines whether the ##Secure## flag is set on the cookies.
* ##0## — off · ##1## — on
- a missing TLS certificate on the server means the loss of access to the admin panel.
##'tls_implicit' => 0,##
- forcibly reconnect the client from HTTP to HTTPS.
* ##0## — off (the site stays reachable via plain HTTP) · ##1## — on
##'enable_security_headers' => 1,##
- set the security headers (frame busting, clickjacking/XSS/CSRF protection).
* ##0## — off · ##1## — on
- the CSP may cause problems with externally hosted resources; disabling it is a security risk.
##'csp' => 1,##
- Content Security Policy.
* ##0## — disabled · ##1## — strict (##config/csp.conf##) · ##2## — custom (##config/csp_custom.conf##)
##'permissions_policy' => 1,##
- HTTP ##Permissions-Policy## header.
* ##0## — disabled · ##1## — strict (##config/permissions_policy.conf##) · ##2## — custom (##config/permissions_policy_custom.conf##)
##'referrer_policy' => 7,##
- the ##Referrer-Policy## HTTP header governs which referrer information sent in the ##Referer## header is included in the responses.
* ##0## — off
* ##1## — ##no-referrer## — no referrer information is sent
* ##2## — ##no-referrer-when-downgrade## — passes the full path, but not from HTTPS to HTTP
* ##3## — ##same-origin## — sends the full path for the same domain, strips it for another website
* ##4## — ##origin## — sends the domain but not the full path
* ##5## — ##strict-origin## — sends the domain for HTTPS→HTTPS and HTTP→HTTP, but not for HTTPS→HTTP
* ##6## — ##origin-when-cross-origin## — sends the full path on the same domain, only the domain to another website
* ##7## — ##strict-origin-when-cross-origin## — (default) sends the full path on the same domain and from one secure page to another, the domain from HTTPS to another domain, and nothing from a secure to an insecure domain
* ##8## — ##unsafe-url## — sends the full path
##'pwd_min_chars' => 10,##
- minimum length of the user password (longer passwords are more secure, e.g. 12 to 16 characters; the use of passphrases is encouraged).
##'pwd_admin_min_chars' => 15,##
- minimum length of the administrator password (e.g. 15 to 20 characters).
##'pwd_char_classes' => 0,##
- the required password complexity.
* ##0## — not tested · ##1## — any letters + numbers · ##2## — uppercase and lowercase + numbers · ##3## — uppercase and lowercase + numbers + characters
##'pwd_unlike_login' => 1,##
- additional complication.
* ##0## — not tested · ##1## — the password is not identical to the login · ##2## — the password does not contain the user name
##'max_login_attempts' => 3,##
- number of login attempts allowed for one account before the anti-spambot task (captcha) is triggered; ##0## disables the task for distinct accounts.
##'ip_login_limit_max' => 50,##
- threshold of the login attempts allowed from a single IP address before the anti-spambot task is triggered (##0## disables it); the option is currently not in use.
##'form_token_time' => 7200,##
- the time in seconds a user has to submit a form; a form may become invalid earlier if the session expires.
##'session_length' => 30,##
- lifetime of the session cookie in days.
##'comment_delay' => 30,##
- minimum delay in seconds between the publication of two comments by the same user (anti-flood).
##'intercom_delay' => 30,##
- minimum delay in seconds between two personal messages (anti-flood).
##'registration_delay' => 10,##
- minimum time in seconds that is required to fill out the registration form, to tell bots from humans.
====Formatter settings (Admin Panel → Formatter)====
##'typografica' => 0,##
- built-in typographical proofreader; disabling it speeds up the saving of pages and comments.
* ##0## — off (default) · ##1## — on
##'paragrafica' => 1,##
- built-in paragrafica; disabling it disconnects the automatic table of contents (##{{toc}}##).
* ##0## — off · ##1## — on (default)
##'allow_rawhtml' => 1,##
- allows the insertion of arbitrary HTML code; this option is potentially unsafe for an open site.
* ##0## — off · ##1## — on (default)
##'disable_safehtml' => 0,##
- filter of the dangerous HTML objects.
* ##0## — the filter is on (default) · ##1## — the filter is off
- turning the filter off on an open site with HTML support is extremely undesirable.
##'allow_x11colors' => 0,##
- extends the available colors for ##??(color) background??## and ##!!(color) text!!##; disabling it speeds up the saving of pages.
##'disable_bracketslinks' => 0,##
- disables the ##[[link]]## and ##((link))## syntax.
* ##0## — enabled (default) · ##1## — disabled
##'disable_wikilinks' => 1,##
- disables the linking of ##CamelCaseWords##; useful when working across different clusters.
* ##0## — WikiLinks enabled · ##1## — disabled (default)
- more about the ((/Dev/Projects/WackoFormatter/Usage WackoFormatter...))
##'disable_formatters' => 0,##
- disables the ##%%code%%%## syntax used for the highlighters.
##'legacy_inline_code' => 0,##
- parse the wiki markup inside the inline code ####code#### (deprecated, will be removed).
##'date_format' => 'dd.MM.y',##
- format of the date (day, month, year).
##'time_format' => 'HH:mm',##
- format of the time (hour, minute).
##'time_format_seconds' => 'HH:mm:ss',##
- format of the exact time (hours, minutes, seconds).
##'name_date_macro' => '%s (%s)',##
- format of the ##::@::## macro, e.g. ##UserName (17.11.2016 16:48)##.
- since !!(green)**R6.1.4**!! the local time/date is formatted with the ((https://unicode-org.github.io/icu/userguide/format_parse/datetime/#date-field-symbol-table ICU Formats)).
##'timezone' => 'UTC',##
- timezone used for the times shown to guests; a logged-in user can change the timezone in the user settings.
##'american_date' => 1,##
- uses the American date format (##MM/dd/y##) as the default for English.
##'canonical' => 0,##
- use fully canonical URLs.
* ##0## — URLs relative to the server root (##/wiki##) are preferred (default)
* ##1## — all links are created as absolute URLs (##https://example.com/wiki##)
##'link_target' => 0,##
- opens each external link in a new browser window (adds ##target="_blank"##).
* ##0## — off · ##1## — on
##'noreferrer' => 0,##
- the browser does not send an HTTP referer header when the user follows the link (adds ##rel="noreferrer"##).
##'nofollow' => 0,##
- tells the search engines that the link should not affect the ranking of the target page (adds ##rel="nofollow"##).
##'urls_underscores' => 0,##
- forms the addresses (URLs) with underscores: ##https://example.com/WackoWiki## becomes ##https://example.com/Wacko_Wiki##.
* ##0## — off · ##1## — on
##'show_spaces' => 1,##
- shows the spaces in the WikiNames, e.g. ##MyName## is displayed as ##My Name##.
##'numerate_links' => 0,##
- enumerates and lists all links at the bottom of the print view.
##'youarehere_text' => '',##
- visualizes the links to the same page; e.g. ##"<b>####</b>"## turns all self-referencing links into bold text.
- for those people who dislike links to the same page.
====Upload settings (Admin Panel → Upload)====
##'upload' => 'admins',##
- right to upload files.
* ##0## — upload disabled
* ##1## — uploading is open to registered users
* a group name (e.g. ##admins##) — only the members of this group may upload
- the group names are stored in lower case.
##'upload_max_size' => 512000,##
- maximum size of a single file in **bytes** (the default 512000 = 500 KiB).
- the value ##0## means that the limit is only the one of the PHP configuration.
- in the Admin Panel the value is entered as a number plus a unit selector (bytes/KiB/MiB).
##'upload_quota' => 0,##
- total storage space for the attachments of the whole wiki; ##0## = unlimited.
##'upload_quota_per_user' => 104857600,##
- storage quota of a single user in bytes (the default 100 MiB); ##0## = unlimited.
##'upload_translit' => 1,##
- transliterate the file names to alphanumeric characters; highly recommended.
* ##0## — off · ##1## — on (default)
##'upload_translit_lower' => 0,##
- convert the file names to lower case; only effective with the transliteration enabled.
##'upload_images_only' => 1,##
- allow only the upload of image files.
* ##0## — no · ##1## — yes (default)
##'upload_allowed_exts' => '',##
- comma separated list of the allowed extensions (e.g. ##png, ogg, mp4##); if empty, all extensions are allowed.
- the extensions that are on the ban list are always removed from this list.
##'upload_banned_exts' => 'asa, asax, ascx, ashx, asmx, asp, aspx, axd, bat, cdx, cer, cgi, cmd, com, config, cpl, csproj, cs, dll, exe, htm, html, htr, htw, ida, idc, idq, jhtml, js, jsb, jsp, licx, mht, mhtml, msi, phar, php, pht, phtm, phtml, pif, pl, printer, py, rem, resources, resx, scr, shtm, shtml, soap, ssi, stm, vb, vbproj, vbs, vdisco, vxd, webinfo, xap, xht, xhtm, xhtml',##
- files with these extensions are forbidden for the upload.
- the option is not exposed in the Admin Panel and has to be changed in the config table.
##'check_mimetype' => 1,##
- some browsers can be tricked into assuming a wrong MIME type; this option rejects such files.
* ##0## — off · ##1## — on (default)
##'mime_type_exclusions' => [...],##
- list of the MIME types that are rejected in addition to the banned extensions (HTML, JavaScript, PHP, shell scripts, etc.).
##'svg_sanitizer' => 1,##
- sanitizes the uploaded SVG files to prevent SVG/XML vulnerabilities.
* ##0## — off · ##1## — on (default)
##'create_thumbnail' => 0,##
- create a thumbnail in all possible situations.
* ##0## — off · ##1## — on
##'image_quality' => 2,##
- quality when scaling a thumbnail.
* ##0## — off · ##1## — max · ##2## — high (default) · ##3## — medium · ##4## — low
##'max_image_area' => 0,##
- maximum number of pixels a source image may have; this limits the memory usage of the image scaler.
* ##-1## — no check at all · ##0## — determine automatically (default) · a value, e.g. ##12500000## for 3500×3500
##'max_thumb_width' => 150,##
- maximum width of a generated thumbnail in pixels; a generated thumbnail never exceeds this width.
- the Admin Panel offers 120, 150, 180, 200, 250 and 300 pixels.
##'max_image_width' => 0,##
- maximum width of an image on the pages; otherwise a scaled down thumbnail is generated.
* ##0## — off · ##320##, ##640##, ##800##, ##1024##, ##1280##, ##2560## pixels
##'min_thumbnail_distance' => 50,##
- do not create a thumbnail for the images that are smaller than this value; the option is not exposed in the Admin Panel.
====Filter settings (Admin Panel → Filter)====
##'spam_filter' => 1,##
- the spam filter searches the whole body of the page for the words listed in ##config/antispam.conf##; if a match is found, the change is not saved.
* ##0## — off · ##1## — on (default)
- the word list itself is edited in the Admin Panel → Filter (one word or phrase fragment per line).
====Email settings (Admin Panel → Email)====
##'enable_email' => 1,##
- enables the sending of e-mails.
* ##0## — disabled · ##1## — enabled
##'enable_email_notification' => 1,##
- allow the e-mail notifications; disabling them has no effect on the e-mails generated as a part of the user signup process.
* ##0## — disabled · ##1## — enabled
##'phpmailer_method' => 'mail',##
- the function used to send the mails via the ((/Dev/Components/Lib/PHPMailer PHPMailer class)).
* ##mail## — the local PHP mail function (default) · ##sendmail## — the sendmail program · ##smtp## — an SMTP server
##'email_from' => 'WackoWiki',##
- the sender name used in the ##From:## header of all the notification e-mails of the site.
##'email_subject_prefix' => '',##
- prefix of the subject of the notification e-mails, e.g. ##[Prefix] Topic##; if empty, the site name is used.
##'noreply_email' => '',##
- the no-reply address that appears in the ##From:## field of the notification e-mails, e.g. ##noreply@example.com##.
##'admin_email' => 'admin@example.com',##
- e-mail of the administrator of the site; it is also used for the notification about new user accounts.
##'abuse_email' => 'admin@example.com',##
- address for requests of urgent matters (registration with a foreign e-mail, etc.); it may coincide with the previous one.
##'smtp_host' => 'localhost',##
- address of the SMTP server; the protocol must be included, e.g. ##ssl://mail.example.com##.
##'smtp_port' => 587,##
- port of the SMTP server (default 587 for ##tls##, possibly 25, and 465 for ##ssl##).
##'smtp_connection_mode' => '',##
- encryption used for the SMTP connection; only used if a user name/password is set.
* ##''## — none · ##ssl## · ##tls##
##'smtp_auto_tls' => 0,##
- opportunistic TLS: encrypt automatically if the server advertises TLS support.
* ##0## — disabled · ##1## — enabled
##'smtp_username' => '',##
- user name, only if the SMTP server requires it.
##'smtp_password' => '',##
- password, only if the SMTP server requires it.
- !!(red)Warning:!! this password is stored as plain text in the database, visible to everybody who can access the database or who can view this configuration page.
====Notification settings (Admin Panel → Notifications)====
##'autosubscribe' => 1,##
- automatically subscribes the author of a page to the notifications for this page.
* ##0## — off · ##1## — on (default)
##'notify_page' => 2,##
- notification on a page change.
* ##0## — off · ##1## — always · ##2## — pending (only the first change until the user visits the page again)
##'notify_comment' => 1,##
- notification on a new comment.
* ##0## — off · ##1## — always · ##2## — pending (only the first comment until the user visits the page again)
##'notify_minor_edit' => 1,##
- sends the notifications also for the minor edits.
* ##0## — off · ##1## — on
##'notify_diff_mode' => 2,##
- diff mode used in the body of the notification e-mails; only the text/plain modes ##2## (source), ##6## (unified) and ##7## (context) are offered.
##'notify_new_user_account' => 1,##
- the administrator is notified when a new user has registered.
##'notify_upload' => 1,##
- the moderators are notified when a file has been uploaded.
##'allow_intercom' => 0,##
- allows other users to send personal messages to the e-mail address of the recipient without disclosing the address.
* ##0## — off · ##1## — on
##'allow_massemail' => 0,##
- only the users who have permitted the administrators to e-mail them may be contacted with mass e-mails.
* ##0## — off · ##1## — on
====Syndication settings (Admin Panel → Syndication)====
##'enable_feeds' => 1,##
- turns the RSS feeds on or off for the entire wiki.
* ##0## — off · ##1## — on
##'xml_changes_link' => 1,##
- defines where the items of the XML changes feed link to.
* ##1## — difference view · ##2## — the revised page · ##3## — list of the revisions · ##4## — the current page
##'noindex' => 0,##
- block the search engines, but allow the normal visitors; it overrides the page settings.
* ##0## — off · ##1## — on
##'opensearch' => 0,##
- creates the OpenSearch description file in the ##xml## folder and enables the autodiscovery of the search plugin in the HTML header.
##'xml_sitemap' => 0,##
- creates the XML sitemap file ##sitemap.xml## in the ##xml## folder; the path can be added to the ##robots.txt##.
* ##0## — off · ##1## — on
##'xml_sitemap_gz' => 0,##
- compress the sitemap with gzip to reduce the bandwidth requirement.
##'xml_sitemap_time' => 1,##
- generate the sitemap only once in the given number of days; ##0## generates it on every page change.
====Pages settings (Admin Panel → Pages)====
##'list_count' => 50,##
- number of items shown in each list for guests, and the default value for new users.
##'comments_count' => 10,##
- number of comments shown per page; applies to all the comments of the site.
##'forum_cluster' => 'Forum',##
- root cluster of the forum section (action ##{{forums}}##).
##'forum_topics' => 10,##
- number of topics displayed per page in the forum sections (action ##{{topics}}##).
##'news_cluster' => 'News',##
- root cluster of the news section (action ##{{news}}##).
##'news_structure' => '',##
- stores the articles optionally in sub-clusters by year/month or week.
* ##''## — no sub-clusters · ##Y/## — by year · ##Y/m/## — by year and month · ##Y/W/## — by year and week
- the derived regular expression is stored in ##news_levels##.
##'enable_license' => 0,##
- show the license information.
* ##0## — off · ##1## — on
##'license' => '',##
- the default license under which the content is released.
##'allow_license_per_page' => 0,##
- allow the page owner to choose the license via the page properties.
* ##0## — off · ##1## — on
##'root_page' => 'HomePage',##
- tag of the home page; it is opened automatically when a user visits the site.
##'help_page' => '',##
- the documentation section for working with the site tools.
##'privacy_page' => '',##
- the page with the privacy policy of the site.
##'terms_page' => '',##
- the page with the rules of the site.
##'search_page' => 'Search',##
- page with the search form (action ##{{search}}##).
##'registration_page' => 'Registration',##
- page for the registration of new users (action ##{{registration}}##).
##'login_page' => 'Login',##
- login page of the site (action ##{{login}}##).
##'account_page' => 'Account',##
- page to customize the user profile (action ##{{usersettings}}##).
##'password_page' => 'Password',##
- page with the form to change/query the user password (action ##{{changepassword}}##).
##'users_page' => 'Users',##
- page with the list of the registered users (action ##{{users}}##).
##'category_page' => 'Category',##
- page with the list of the categorized pages (action ##{{category}}##).
##'groups_page' => 'Groups',##
- page with the list of the working groups (action ##{{usergroups}}##).
##'whatsnew_page' => 'WhatsNew',##
- page with the list of all new, deleted or changed pages, new attachments and comments (action ##{{whatsnew}}##).
##'changes_page' => '',##
- page with the list of the last modified pages (action ##{{changes}}##).
##'comments_page' => '',##
- page with the list of the recent comments (action ##{{commented}}##).
##'index_page' => 'Index',##
- page with the list of all pages (action ##{{pageindex}}##).
##'random_page' => 'Random',##
- page that loads a random page (action ##{{randompage}}##).
##'removals_page' => '',##
- page with the list of the recently deleted pages (action ##{{deleted}}##).
##'wanted_page' => '',##
- page with the list of the missing pages that are referenced (action ##{{wanted}}##).
##'orphaned_page' => '',##
- page with the list of the existing pages that are not related by links to any other page (action ##{{orphaned}}##).
##'sandbox' => '',##
- page where the users can practice their wiki markup skills.
====Appearance settings (Admin Panel → Appearance)====
##'theme' => 'default',##
- the template (skin) used by default; the themes are located in the ##theme/## folder.
##'allow_themes' => 0,##
- the themes the users may choose.
* ##0## — all available themes are allowed (default)
* a list, e.g. ##default,coffee## — only these themes are allowed
##'allow_themes_per_page' => 0,##
- allow the theme to be chosen per page by the page owner (via the page properties).
* ##0## — not allowed (default) · ##1## — allowed
##'theme_color' => '',##
- the color of the browser address bar (CSS color).
##'site_logo' => 'wacko_logo.png',##
- the logo of the site; the maximum size is 2 MiB, the optimal dimensions are 255×55 pixels.
##'logo_display' => 0,##
- appearance of the logo.
* ##0## — off (default) · ##1## — logo only · ##2## — logo and title
##'logo_height' => 50,##
- height of the displayed logo in pixels.
##'logo_width' => 108,##
- width of the displayed logo in pixels.
##'site_favicon' => '',##
- the shortcut icon (favicon) of the site; it overrides the favicon of the theme. Maximum 64×64 pixels.
====Other settings (not exposed in the Admin Panel)====
##'max_page_size' => 2097152,##
- maximum size of a page in bytes (2 MiB).
##'publish_anonymously' => 0,##
- allows the users to publish anonymously (to hide the name).
* ##0## — off · ##1## — on
##'user_can_delete_account' => 0,##
- allows the users to delete their own account.
##'standard_handlers' => 'addcomment|admin\.php|attachments|categories|claim|clone|diff|edit|export\.xml|file|latex|moderate|new|permissions|purge|print|properties|rate|referrers|referrers_sites|remove|rename|review|revisions|revisions\.xml|show|source|upload|watch|watchers|wordprocessor',##
- the collection of the page handlers (processors) that are available for the pages of the wiki.
##'reserved_namespaces' => 'admin|file|image|js|robots\.txt|theme|xml',##
- the namespaces that are reserved by the system and cannot be used as a cluster name.
##'system_message' => '',##
- the text of the system message that is shown on every page.
##'system_message_type' => '',##
- the type (CSS class) of the system message.
##'system_message_audience' => 1,##
- the audience the system message is shown to.
##'enable_system_message' => 1,##
- show the system message.
* ##0## — off · ##1## — on
##'ap_failed_login_count' => 0,##
- number of failed login attempts in the Admin Panel before it is blocked.
##'ap_max_login_attempts' => 4,##
- maximum number of the login attempts in the Admin Panel.
##'cookie_prefix' => '',##
- prefix of the cookie names (useful if several wikis run on the same host).
##'email_priority' => 3,##
- priority of the notification e-mails (##1## — highest … ##5## — lowest).
##'check_mx_record' => 0,##
- check the MX record of the e-mail domain of the user.
##'validate_email' => 1,##
- validate the format of the e-mail address on the registration.
##'email_pattern' => '',##
- additional regular expression that every e-mail address must match.
##'trusted_domains' => '',##
- list of the trusted domains (the option is currently not in use).
##'ext_bad_behaviour' => 0,##
- enable the Bad Behaviour extension (spam protection).
* ##0## — off · ##1## — on
===constants===
The detailed description of the configuration file **config/constants.php**
====versions and requirements====
* ##WACKO_VERSION## = ##'6.3.2'## — the version of the software; **do not change** it manually.
* ##PHP_MIN_VERSION## = ##'8.3'## — minimum required PHP version.
* ##PHP_MAX_VERSION## = ##'8.5'## — maximum supported PHP version.
* ##PHP_ERROR_REPORTING## = ##0## — PHP error reporting: ##0## — off, ##6## — all.
* ##DB_MIN_VERSION## = ##['mariadb' => '10.6', 'mysql' => '8.0', 'sqlite' => '3.24']## — minimum database versions.
* ##DB_ERROR_MODE## = ##0## — ##0## silent, ##1## warning, ##2## exception.
* ##WACKO_ENV## = ##4## — ##1## development, ##2## test, ##3## stage, ##4## production.
* ##HTML_ENTITIES_CHARSET## = ##'UTF-8'##.
====paths====
* ##CONFIG_DIR## = ##'config'##, ##CONFIG_FILE## = ##'config/config.php'##, ##CONFIG_DEFAULTS## = ##'config/config_defaults.php'##.
* ##SITE_LOCK## = ##'config/lock'##, ##AP_LOCK## = ##'config/lock_ap'##.
* ##ACTION_DIR## = ##'action'##, ##HANDLER_DIR## = ##'handler'##, ##FORMATTER_DIR## = ##'formatter'##, ##LANG_DIR## = ##'lang'##, ##THEME_DIR## = ##'theme'##, ##IMAGE_DIR## = ##'image'##.
* ##BACKUP_DIR## = ##'file/backup'##, ##DATA_DIR## = ##'file/data'##, ##THUMB_DIR## = ##'file/thumb'##, ##THUMB_LOCAL_DIR## = ##'file/thumb_local'##, ##UPLOAD_GLOBAL_DIR## = ##'file/global'##, ##UPLOAD_LOCAL_DIR## = ##'file/perpage'##, ##XML_DIR## = ##'xml'##.
* ##CACHE_CONFIG_DIR## = ##'_cache/config'##, ##CACHE_FEED_DIR## = ##'_cache/feed'##, ##CACHE_PAGE_DIR## = ##'_cache/page'##, ##CACHE_SQL_DIR## = ##'_cache/query'##, ##CACHE_TEMPLATE_DIR## = ##'_cache/template'##, ##CACHE_SESSION_DIR## = ##'/tmp'##.
====permissions and limits====
* ##CHMOD_SAFE## = ##0640## (better ##0600## in production), ##CHMOD_FILE## = ##0644##, ##CHMOD_DIR## = ##0755##.
* ##DAYSECS## = ##86400##.
* ##INTERCOM_MAX_SIZE## = ##262144## — maximum size of a personal message (256 KiB).
* ##BACKUP_COMPRESSION_RATE## = ##9##, ##BACKUP_MEMORY_STEP## = ##1048576##, ##BACKUP_FILE_LOG## = ##'backup.log'##, ##BACKUP_FILE_STRUCTURE## = ##'structure.sql'##, ##BACKUP_FILE_DUMP_SUFFIX## = ##'.dat.gz'##, ##BACKUP_FILE_GZIP_SUFFIX## = ##'.gz'##.
====SQL modes====
* ##SQL_MODE_STRICT## = ##['mariadb' => 'TRADITIONAL,NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY', 'mysql' => 'TRADITIONAL,NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY']##
* ##SQL_MODE_LAX## = ##['mariadb' => 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER', 'mysql' => 'NO_ENGINE_SUBSTITUTION']##
- the mode in use is selected with the ##sql_mode## setting: ##0## server, ##1## lax, ##2## strict.
====system values====
* ##SYSTEM_LANG## = ##-1##, ##GUEST## = ##'guest@wacko'##, ##AUTH_TOKEN## = ##'Auth'##, ##COOKIE_SAMESITE## = ##'Lax'## (##Strict##, ##Lax##, ##None##).
* ##SITEMAP_XML## = ##'sitemap.xml'##, ##HTTP_403## / ##HTTP_404## = ##'image/upload403.svg'## / ##'image/upload404.svg'##.
* ##NBSP## = the non-breaking space (##\u{00A0}##).
* ##GLOB_ALL## = ##'{,.}*'##, ##ADD_NO_DIV## = ##'*'##.
* ##RECOVERY_MODE## = ##0## (##1## — restore the database), ##AUTO_REWRITE## = ##1## (##0## — off, turns off the automatic rewrite for debugging).
* ##ACTION4DIFF## = ##'anchor, toc'## — the actions that are allowed in the diff view.
* ##LOAD_NOCACHE## / ##LOAD_CACHE## / ##LOAD_ALL## / ##LOAD_META## — the flags of the page loading.
* ##IS_HEADING## = ##66666##, ##IS_PARAGRAPH## = ##77777##, ##IS_INCLUDE## = ##99999##.
* ##MENU_AUTO## = ##0##, ##MENU_USER## = ##1##, ##MENU_DEFAULT## = ##2##.
* ##LINK_PAGE## = ##0##, ##LINK_FILE## = ##1##, ##LINK_EXTERNAL## = ##2##.
* ##OBJECT_PAGE## = ##1##, ##OBJECT_FILE## = ##2##, ##OBJECT_REVISION## = ##3##.
* ##TB_DEFAULT## — the default list of the editor toolbar buttons.