Configuration


Config parameters for WackoWiki R6.1


Default values are set in the config_defaults.php file in the config/ folder.

1. Primary

generated by installer


config/config.php

<?php
 
$wacko_config = [
    'base_url' => 'https://example.com/wiki/',
    'db_charset' => 'utf8mb4',
    'db_collation' => 'utf8mb4_unicode_520_ci',
    'db_driver' => 'mysql_pdo',
    'db_engine' => 'InnoDB',
    'db_host' => 'localhost',
    'db_port' => '3306',
    'db_name' => 'wiki',
    'db_user' => 'db_user_name',
    'db_password' => '',
    'sql_mode_strict' => '1',
    'table_prefix' => 'wacko_',
    'system_seed' => 'c-&P[(13N#Nj62l*mYE4',
    'hashid_seed' => '6MH]g{Fpa}#Ck~I22^X#',
    'recovery_password' => '',
    'wacko_version' => '6.1.22',
];

2. Secondary

stored in config table


Changes in the secondary config can be done via

  1. editing the config_value in the config table via phpMyAdmin.
    • Don't forget to delete the _cache/config/config.php afterwards, e.g. {{admincache}}
  2. the Admin panel

no config_name value default
1. abuse_email abuse@example.com
2. account_page Settings
3. acl_lock 0
4. admin_email webmaster@example.com
5. admin_name WikiAdmin
6. allow_email_reuse 0
7. allow_intercom 0
8. allow_license_per_page 0
9. allow_massemail 0
10. allow_persistent_cookie 1
11. allow_rawhtml 1
12. allow_registration 0
13. allow_themes 0
14. allow_themes_per_page 1
15. allow_x11colors 0
16. allowed_email_domains
17. allowed_languages 0
18. anonymize_ip 0
19. ap_failed_login_count 0
20. ap_max_login_attempts 4
21. approve_new_user 0
22. attachments_handler 2
23. autosubscribe 1
24. cache 1
25. cache_sql 0
26. cache_sql_ttl 600
27. cache_ttl 600
28. canonical 0
29. captcha_edit_page 1
30. captcha_new_comment 1
31. captcha_new_page 1
32. captcha_registration 1
33. categories_handler 1
34. category_page Category
35. changes_page RecentChanges
36. check_mimetype 1
37. comment_delay 30
38. comments_count 10
39. comments_page RecentlyCommented
40. csp 1
41. date_format dd.MM.yyyy
42. debug 3
43. debug_admin_only 0
44. debug_sql_threshold 0
45. default_comment_acl $
46. default_create_acl $
47. default_diff_mode 3
48. default_read_acl *
49. default_rename_redirect 0
50. default_upload_acl Admins
51. default_write_acl $
52. diff_modes 0,1,2,3,4,5
53. disable_bracketslinks 0
54. disable_formatters 0
55. disable_safehtml 0
56. disable_wikilinks 1
57. disable_wikiname 1
58. edit_summary 0
59. email_from WackoWiki
60. email_priority 3
61. enable_captcha 1
62. enable_comments 1
63. enable_counters 1
64. enable_email 1
65. enable_email_notification 1
66. enable_feeds 1
67. enable_license 0
68. enable_referrers 1
69. enable_security_headers 1
70. enable_system_message 1
71. export_handler 2
72. ext_bad_behaviour 1
73. footer_comments 1
74. footer_files 1
75. footer_tags 1
76. form_token_time 7200
77. forum_cluster Forum
78. forum_topics 10
79. groups_page Groups
80. help_page
81. hide_index 0
82. hide_locked 1
83. hide_revisions 0
84. hide_toc 0
85. img_create_thumbnail 0
86. img_max_thumb_width 150
87. index_page PageIndex
88. intercom_delay 30
89. ip_login_limit_max 50
90. keep_deleted_time 0
91. language en
92. license
93. link_target 0
94. list_count 50
95. log_default_show 1
96. log_level 7
97. log_purge_time 0
98. login_page Login
99. logo_display 0
100. logo_height 50
101. logo_width 108
102. maint_last_cache 1678714426
103. maint_last_delpages 1
104. maint_last_log 1
105. maint_last_oldpages 1
106. maint_last_refs 1678785439
107. maint_last_session 1678732727
108. maint_last_update 2023-03-10 17:02:15
109. maint_last_xml_sitemap 1
110. max_login_attempts 3
111. max_page_size 2097152
112. menu_items 5
113. minor_edit 0
114. multilanguage 1
115. name_date_macro %s (%s)
116. news_cluster News
117. news_levels /.+
118. news_structure
119. nofollow 0
120. noindex 0
121. noreferrer 0
122. noreply_email noreply@example.com
123. notify_comment 1
124. notify_diff_mode 2
125. notify_minor_edit 1
126. notify_new_user_account 1
127. notify_page 2
128. notify_upload 1
129. numerate_links 0
130. opensearch 0
131. owners_can_remove_comments 1
132. pages_purge_time 0
133. paragrafica 1
134. password_page Password
135. permissions_policy 1
136. phpmailer_method mail
137. privacy_page
138. publish_anonymously 0
139. pwd_admin_min_chars 15
140. pwd_char_classes 0
141. pwd_min_chars 10
142. pwd_unlike_login 1
143. random_page RandomPage
144. referrer_policy 7
145. referrers_purge_time 1
146. registration_delay 10
147. registration_page Registration
148. remove_onlyadmins 0
149. rename_global_acl Admins
150. reverse_proxy 0
151. reverse_proxy_addresses
152. reverse_proxy_header
153. review 0
154. rewrite_mode 1
155. root_page HomePage
156. search_page Search
157. section_edit 1
158. session_length 30
159. session_notice 0
160. session_store 1
161. show_permalink 1
162. show_spaces 1
163. site_desc Cover what you do best. Link to the rest.
164. site_favicon favicon.svg
165. site_logo wacko_logo.png
166. site_name MyWikiSite
167. smtp_auto_tls 1
168. smtp_connection_mode
169. smtp_host localhost
170. smtp_password
171. smtp_port 587
172. smtp_username
173. sorting_comments 0
174. source_handler 1
175. spam_filter 1
176. standard_handlers addcomment|admin\.php|attachments|categories|...
177. store_deleted_pages 1
178. svg_sanitizer 1
179. system_message
180. system_message_type
181. terms_page
182. theme default
183. theme_color #000000
184. time_format HH:mm
185. time_format_seconds HH:mm:ss
186. timezone UTC
187. tls 1
188. tls_implicit 0
189. tree_level 1
190. typografica
191. upload moderator
192. upload_allowed_exts avif, gif, jpe, jpeg, jpg, jxl, m4a, mp3, ogg, ogv, pdf, png, txt, webm, zip
193. upload_banned_exts asax, asa, ascx, ashx, asmx, aspx, asp, axd, ...
194. upload_images_only 1
195. upload_max_size 104857600
196. upload_quota 0
197. upload_quota_per_user 104857600
198. upload_translit 1
199. urls_underscores 0
200. user_can_delete_account 0
201. username_chars_max 20
202. username_chars_min 3
203. users_page Users
204. xml_sitemap 0
205. xml_sitemap_gz 0
206. xml_sitemap_time 1
207. xml_sitemap_update
208. youarehere_text

3. User Settings

stored in usersetting table


Relation of corresponding user settings to config settings:


guest user remarks
config
user setting

The default values for the user settings are either set as DEFAULT value in the table itself or taken from the corresponding settings in the secondary config.


no  config_name value default
1. allow_intercom
2. allow_massemail
3. autocomplete
4. diff_mode
5. dont_redirect
6. doubleclick_edit
7. hide_lastsession
8. list_count
9. menu_items
10. noid_pubs
11. notify_comment
12. notify_minor_edit
13. notify_page
14. numerate_links
15. send_watchmail
16. session_length
17. show_comments
18. show_files
19. show_spaces
20. sorting_comments
21. theme
22. timezone
23. user_lang
24. validate_ip

4. Constants

config/constants.php

const CONFIG_DIR			= 'config'; // NB hardcoded as config/constants.php for bootstrap
const CONFIG_FILE			= 'config/config.php';
const CONFIG_DEFAULTS			= 'config/config_defaults.php';
const SITE_LOCK				= 'config/lock';
const AP_LOCK				= 'config/lock_ap';

const ACTION_DIR			= 'action';
const LANG_DIR				= 'lang';
const FORMATTER_DIR			= 'formatter';
const HANDLER_DIR			= 'handler';
const IMAGE_DIR				= 'image';
const THEME_DIR				= 'theme';
const THUMB_DIR				= 'file/thumb';
const UPLOAD_GLOBAL_DIR			= 'file/global';
const UPLOAD_PER_PAGE_DIR		= 'file/perpage';
const UPLOAD_BACKUP_DIR			= 'file/backup';
const XML_DIR				= 'xml';

const CACHE_CONFIG_DIR			= '_cache/config';
const CACHE_FEED_DIR			= '_cache/feed';
const CACHE_PAGE_DIR			= '_cache/page';
const CACHE_SQL_DIR			= '_cache/query';
const CACHE_TEMPLATE_DIR		= '_cache/template';
const CACHE_SESSION_DIR			= '/tmp';			// '_cache/session'

const CHMOD_SAFE			= 0640;				// better to use 0600 in production
const CHMOD_FILE			= 0644;				// file creation mode
const CHMOD_DIR				= 0755;				// directory creation mode

const SITEMAP_XML			= 'sitemap.xml';

const HTTP_403				= 'image/upload403.svg';
const HTTP_404				= 'image/upload404.svg';

const DAYSECS				= 86400;			// 24 * 60 * 60

const BACKUP_COMPRESSION_RATE		= 9;				// gzip compression rate
const BACKUP_MEMORY_STEP		= 1048576;			// max bytes to process per cycle (make sure it's at least 10 times less than PHP memory limit!)
const BACKUP_FILE_LOG			= 'backup.log';		// backup log filename
const BACKUP_FILE_STRUCTURE		= 'structure.sql';	// tables structure filename
const BACKUP_FILE_DUMP_SUFFIX		= '.dat.gz';		// tables dump filename suffix
const BACKUP_FILE_GZIP_SUFFIX		= '.gz';			// regular compressed files suffix

const GLOB_ALL				= '{,.}*';			// for glob()
const ADD_NO_DIV			= '*';				// for Wacko::method()
const SYSTEM_LANG			= -1;				// for Wacko::_t()

const AUTH_TOKEN			= 'Auth';
const GUEST				= 'guest@wacko';
const INTERCOM_MAX_SIZE			= 262144;

const LOAD_NOCACHE			= 0;
const LOAD_CACHE			= 1;
const LOAD_ALL				= 0;
const LOAD_META				= 1;

const MENU_AUTO				= 0;
const MENU_USER				= 1;
const MENU_DEFAULT			= 2;

const LINK_PAGE				= 0;
const LINK_FILE				= 1;
const LINK_EXTERNAL			= 2;

const OBJECT_PAGE			= 1;
const OBJECT_FILE			= 2;

const NBSP				= ' ';				// \u{00A0} No-Break Space (NBSP)

const RECOVERY_MODE			= 0;				// 1 - restore database
const AUTO_REWRITE			= 1;				// 0 - off, turns off auto rewrite for debugging,

const SQL_MODE_STRICT			= 'TRADITIONAL,NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY';
const SQL_MODE_PERMISSIVE		= 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER';

// Do not change these two lines, PLEASE-PLEASE. In fact, don't change anything! Ever!
const WACKO_VERSION			= '6.1.22';
const HTML_ENTITIES_CHARSET		= 'UTF-8';

const WACKO_ENV				= 4;	// Environment: 1 - development, 2 - test, 3 - stage, 4 - production

const ACTION4DIFF			= 'anchor, toc';	// allowed actions in DIFF

const DB_MIN_VERSION			= ['mariadb' => '10.2.2', 'mysql' => '5.7.7'];
const DB_ERROR_MODE			= 0;	// DB error mode: 0 - silent, 1 - warning, 2 - exception

const PHP_MIN_VERSION			= '8.0';	// minimum required PHP version
const PHP_MAX_VERSION			= '8.1';	// maximum required PHP version
const PHP_ERROR_REPORTING		= 0;		// PHP error reporting: 0 - off, 6 - all