WackoWiki: Configuration

https://wackowiki.org/doc     Version: 16 (01.06.2022 09:47)

Configuration


Config parameters[link1] for WackoWiki R6.1

Default values are set in the config_defaults.php[link2] 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_vendor' => 'mariadb',
    'db_host' => 'localhost',
    'db_port' => '3306',
    'db_name' => 'wiki',
    'db_user' => 'db_user_name',
    'db_password' => '',
    'sql_mode' => '2',
    'table_prefix' => 'wacko_',
    'system_seed' => 'c-&P[(13N#Nj62l*mYE4',
    'hashid_seed' => '6MH]g{Fpa}#Ck~I22^X#',
    'recovery_password' => '',
    'wacko_version' => '6.1.26',
];

2. Secondary

stored in config table


Changes in the secondary config[link1] 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[link3]

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 1
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. create_thumbnail 1
41. csp 1
42. date_format dd.MM.yyyy
43. debug 3
44. debug_admin_only 0
45. debug_sql_threshold 0
46. default_comment_acl $
47. default_create_acl $
48. default_diff_mode 3
49. default_read_acl *
50. default_rename_redirect 0
51. default_upload_acl Admins
52. default_write_acl $
53. diff_modes 0,1,2,3,4,5
54. disable_bracketslinks 0
55. disable_formatters 0
56. disable_safehtml 0
57. disable_wikilinks 1
58. disable_wikiname 1
59. edit_summary 1
60. email_confirmation 1
61. email_from WackoWiki
62. email_priority 3
63. email_subject_prefix
64. enable_captcha 1
65. enable_comments 1
66. enable_counters 1
67. enable_email 1
68. enable_email_notification 1
69. enable_feeds 1
70. enable_license 0
71. enable_referrers 1
72. enable_security_headers 1
73. enable_system_message 0
74. export_handler 1
75. ext_bad_behaviour 1
76. feed_linkto diff
77. footer_comments 1
78. footer_files 1
79. footer_tags 1
80. forbidden_email_domains
81. form_token_time 7200
82. forum_cluster Forum
83. forum_topics 10
84. groups_page Groups
85. help_page
86. hide_index 0
87. hide_locked 1
88. hide_revisions 0
89. hide_toc 0
90. index_page PageIndex
91. intercom_delay 30
92. ip_login_limit_max 50
93. jpeg_quality 92
94. keep_deleted_time 0
95. language en
96. license
97. link_target 0
98. list_count 50
99. log_default_show 6
100. log_level 7
101. log_purge_time 0
102. login_page Login
103. logo_display 0
104. logo_height 50
105. logo_width 108
106. maint_last_cache 1708608249
107. maint_last_delpages 1
108. maint_last_log 1
109. maint_last_oldpages 1
110. maint_last_refs 1708691049
111. maint_last_session 1708863849
112. maint_last_update 2023-07-21 09:47:05
113. maint_last_xml_sitemap 1696143719
114. max_image_area 0
115. max_image_width 1024
116. max_login_attempts 3
117. max_page_size 2097152
118. max_thumb_width 150
119. menu_items 5
120. minor_edit 1
121. multilanguage 1
122. name_date_macro %s (%s)
123. news_cluster News
124. news_levels /.+
125. news_structure
126. nofollow 0
127. noindex 1
128. noreferrer 0
129. noreply_email noreply@example.com
130. notify_comment 1
131. notify_diff_mode 2
132. notify_minor_edit 1
133. notify_new_user_account 1
134. notify_page 2
135. notify_upload 1
136. numerate_links 0
137. opensearch 0
138. owners_can_remove_comments 1
139. pages_purge_time 0
140. paragrafica 1
141. password_page Password
142. permissions_policy 1
143. phpmailer_method mail
144. privacy_page
145. publish_anonymously 0
146. pwd_admin_min_chars 15
147. pwd_char_classes 0
148. pwd_min_chars 10
149. pwd_unlike_login 1
150. random_page RandomPage
151. referrer_policy 7
152. referrers_purge_time 1
153. registration_delay 10
154. registration_page Registration
155. remove_onlyadmins 0
156. rename_global_acl Admins
157. reverse_proxy 0
158. reverse_proxy_addresses
159. reverse_proxy_header
160. review 0
161. rewrite_mode 1
162. root_page HomePage
163. search_page Search
164. section_edit 1
165. session_length 30
166. session_notice 0
167. session_store 1
168. show_permalink 1
169. show_spaces 1
170. site_desc Cover what you do best. Link to the rest.
171. site_favicon favicon.svg
172. site_logo wacko_logo.png
173. site_name MyWikiSite
174. smtp_auto_tls 1
175. smtp_connection_mode
176. smtp_host localhost
177. smtp_password
178. smtp_port 587
179. smtp_username
180. sorting_comments 0
181. source_handler 1
182. spam_filter 1
183. standard_handlers addcomment|admin\.php|attachments|categories|...
184. store_deleted_pages 1
185. svg_sanitizer 1
186. system_message
187. system_message_audience 1
188. system_message_type warning
189. terms_page
190. theme default
191. theme_color #000000
192. time_format HH:mm
193. time_format_seconds HH:mm:ss
194. timezone UTC
195. tls 1
196. tls_implicit 0
197. tree_level 1
198. typografica 0
199. upload admins
200. upload_allowed_exts avif, gif, jpe, jpeg, jpg, jxl, m4a, mp3, odt, ogg, ogv, pdf, png, svg, txt, webm, zip
201. upload_banned_exts asax, asa, ascx, ashx, asmx, aspx, asp, axd, ...
202. upload_images_only 1
203. upload_max_size 52428800
204. upload_quota 0
205. upload_quota_per_user 0
206. upload_translit 1
207. urls_underscores 1
208. user_can_delete_account 0
209. username_chars_max 20
210. username_chars_min 3
211. users_page Users
212. xml_changes_link 1
213. xml_sitemap 1
214. xml_sitemap_gz 0
215. xml_sitemap_time 1
216. xml_sitemap_update 0
217. 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[link4]

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_LOCAL_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 COOKIE_SAMESITE			= 'Lax';			// Strict, Lax, None
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		= [
		'mariadb'	=> 'TRADITIONAL,NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY',
		'mysql'		=> 'TRADITIONAL,NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY'
];
const SQL_MODE_LAX		= [
		'mariadb'	=> 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER',
		'mysql'		=> 'NO_ENGINE_SUBSTITUTION'
];

// Do not change these two lines, PLEASE-PLEASE. In fact, don't change anything! Ever!
const WACKO_VERSION			= '6.1.26';
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.3';	// maximum required PHP version
const PHP_ERROR_REPORTING		= 0;		// PHP error reporting: 0 - off, 6 - all