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.1',
];

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 0
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  2
41. date_format d.m.Y
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_typografica 1
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. dst  0
60. edit_summary 0
61. email_from WackoWiki
62. email_priority 3
63. enable_captcha 1
64. enable_comments 1
65. enable_counters 1
66. enable_email 1
67. enable_email_notification 1
68. enable_feeds 1
69. enable_license 0
70. enable_referrers 0
71. enable_security_headers 1
72. enable_system_message 1
73. export_handler 2
74. ext_bad_behavior 0
75. footer_comments 1
76. footer_files 1
77. footer_rating 0
78. footer_tags 1
79. form_token_time 7200
80. forum_cluster Forum
81. forum_topics 10
82. groups_page Groups
83. help_page
84. hide_index 0
85. hide_locked 1
86. hide_revisions 0
87. hide_toc 0
88. img_create_thumbnail 0
89. img_max_thumb_width 150
90. index_page PageIndex
91. intercom_delay 30
92. ip_login_limit_max 50
93. keep_deleted_time 0
94. language en 
95. license
96. link_target 0
97. list_count 50
98. log_default_show 1
99. log_level 0
100. log_purge_time 0
101. login_page Login
102. logo_display 0
103. logo_height 50
104. logo_width 108
105. maint_last_cache 1634274208
106. maint_last_delpages 1
107. maint_last_log 1
108. maint_last_oldpages 1
109. maint_last_refs 1634357008
110. maint_last_session 1634529808
111. maint_last_update 2021-10-03 21:23:13
112. maint_last_xml_sitemap 1
113. max_login_attempts 3
114. menu_items 5
115. minor_edit 0
116. multilanguage 1
117. name_date_macro %s (%s)
118. news_cluster News
119. news_levels /.+/.+
120. news_structure Y/
121. nofollow 0
122. noindex 0
123. noreferrer 0
124. noreply_email noreply@example.com
125. notify_comment 1
126. notify_diff_mode 2
127. notify_minor_edit 1
128. notify_new_user_account 1
129. notify_page 2
130. notify_upload 1
131. numerate_links 0
132. opensearch 0
133. owners_can_remove_comments 1
134. pages_purge_time 0
135. paragrafica 1
136. password_page Password
137. permissions_policy 1
138. phpmailer_method mail
139. privacy_page
140. publish_anonymously 0
141. pwd_admin_min_chars 15
142. pwd_char_classes 0
143. pwd_min_chars 10
144. pwd_unlike_login 1
145. random_page RandomPage
146. referrer_policy 7
147. referrers_purge_time 1
148. registration_delay 10
149. registration_page Registration
150. remove_onlyadmins 0
151. rename_globalacl Admins
152. reverse_proxy 0
153. reverse_proxy_addresses
154. reverse_proxy_header
155. review 0
156. rewrite_mode 1
157. root_page HomePage
158. search_page Search
159. session_length 30
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
165. site_logo wacko_logo.png
166. site_name MyWikiSite
167. smtp_connection_mode
168. smtp_host localhost
169. smtp_password
170. smtp_port 587
171. smtp_username
172. sorting_comments 0
173. source_handler 1
174. spam_filter 1
175. standard_handlers addcomment|admin\.php|attachments|categories|...
176. store_deleted_pages 1
177. system_message
178. system_message_type
179. tag_page Tag 
180. terms_page
181. theme default
182. time_format H:i
183. time_format_seconds H:i:s
184. timezone 0
185. tls  0
186. tls_implicit 0
187. tree_level 1
188. upload admins
189. upload_banned_exts cgi|js|php|php3|php4|php5|php7|pl|...
190. upload_images_only 0
191. upload_max_size 512000
192. upload_quota 0
193. upload_quota_per_user 104857600
194. upload_translit 1
195. urls_underscores 0
196. user_can_delete_account 0
197. username_chars_max 20
198. username_chars_min 3
199. users_page Users
200. xml_sitemap 1
201. xml_sitemap_gz 1
202. xml_sitemap_time 0
203. xml_sitemap_update
204. 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. dst 
8. hide_lastsession
9. list_count
10. menu_items
11. noid_pubs
12. notify_comment
13. notify_minor_edit
14. notify_page
15. numerate_links
16. send_watchmail
17. session_length
18. show_comments
19. show_files
20. show_spaces
21. sorting_comments
22. theme
23. timezone
24. typografica
25. user_lang
26. 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 three lines, PLEASE-PLEASE. In fact, don't change anything! Ever!
const WACKO_VERSION			= '6.1.1';
const HTML_ENTITIES_CHARSET		= 'UTF-8';
const XML_HTMLSAX3			= 'lib/HTMLSax3/';

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

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

const DB_MIN_VERSION			= ['mariadb' => '10.2.2', 'mysql' => '5.7.7'];

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