Configuration


Config parameters for WackoWiki R6.0


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

1. Primary

generated by installer


config/config.php

<?php
 
$wacko_config = [
    'base_url' => 'https://example.com/wiki/',
    'database_charset' => 'utf8mb4',
    'database_collation' => 'utf8mb4_unicode_520_ci',
    'database_driver' => 'mysql_pdo',
    'database_engine' => 'InnoDB',
    'database_host' => 'localhost',
    'database_port' => '3306',
    'database_database' => 'wiki',
    'database_user' => 'db_user_name',
    'database_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.0.0',
];

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. allowed_languages
7. allow_email_reuse 0
8. allow_intercom 0
9. allow_license_per_page 0
10. allow_massemail 0
11. allow_persistent_cookie 1
12. allow_rawhtml 1
13. allow_registration 0
14. allow_themes 0
15. allow_themes_per_page 0
16. allow_x11colors 0
17. anonymize_ip 0
18. approve_new_user 0
19. ap_failed_login_count 0
20. ap_max_login_attempts 4
21. attachments_handler 2
22. autosubscribe 1
23. cache 1
24. cache_sql 0
25. cache_sql_ttl 600
26. cache_ttl 18000
27. canonical 0
28. captcha_edit_page 1
29. captcha_new_comment 1
30. captcha_new_page 1
31. captcha_registration 1
32. category_page Category
33. changes_page RecentChanges
34. check_mimetype 1
35. comments_count 10
36. comments_page RecentlyCommented
37. comment_delay 30
38. csp  1
39. date_format d.m.Y
40. debug 3
41. debug_admin_only 0
42. debug_sql_threshold 0
43. default_comment_acl $
44. default_create_acl $
45. default_diff_mode 2
46. default_read_acl *
47. default_rename_redirect 0
48. default_typografica 1
49. default_upload_acl Admins
50. default_write_acl $
51. diff_modes 0,1,2,3,4,5
52. disable_bracketslinks 0
53. disable_formatters 0
54. disable_safehtml 0
55. disable_wikilinks 1
56. disable_wikiname 1
57. dst  0
58. edit_summary 0
59. email_from WackoWiki
60. email_priority 3
61. enable_captcha 1
62. enable_comments 1
63. enable_email 1
64. enable_email_notification 1
65. enable_feeds 1
66. enable_license 0
67. enable_referrers 0
68. enable_security_headers 0
69. enable_system_message 1
70. ext_bad_behavior 0
71. footer_comments 1
72. footer_files 1
73. footer_rating 0
74. footer_tags 1
75. form_token_time 7200
76. forum_cluster Forum
77. forum_topics 10
78. groups_page Groups
79. help_page
80. hide_index 0
81. hide_locked 1
82. hide_revisions 0
83. hide_toc 0
84. img_create_thumbnail 0
85. img_max_thumb_width 150
86. index_page PageIndex
87. intercom_delay 30
88. ip_login_limit_max 50
89. keep_deleted_time 0
90. language en 
91. license
92. link_target 0
93. list_count 50
94. login_page Login
95. logo_display 0
96. logo_height 50
97. logo_width 108
98. log_default_show 1
99. log_level 0
100. log_purge_time 0
101. maint_last_cache 1590483348
102. maint_last_delpages 1
103. maint_last_log 1
104. maint_last_oldpages 1
105. maint_last_refs 1590566148
106. maint_last_session 1590738948
107. maint_last_update 2020-04-22 16:01:02
108. maint_last_xml_sitemap 1590256993
109. max_login_attempts 3
110. menu_items 5
111. minor_edit 0
112. multilanguage 1
113. name_date_macro %s (%s)
114. news_cluster
115. news_levels
116. nofollow 1
117. noindex 0
118. noreferrer 0
119. noreply_email noreply@example.com
120. notify_comment 1
121. notify_diff_mode 2
122. notify_minor_edit 1
123. notify_new_user_account 1
124. notify_page 2
125. notify_upload 1
126. numerate_links 0
128. owners_can_change_categories 1
129. owners_can_remove_comments 1
130. pages_purge_time 0
131. paragrafica 1
132. password_page Password
133. phpmailer_method mail
134. privacy_page
135. publish_anonymously 0
136. pwd_admin_min_chars 15
137. pwd_char_classes 0
138. pwd_min_chars 10
139. pwd_unlike_login 1
140. random_page RandomPage
141. referrers_purge_time 1
142. referrer_policy 6
143. registration_delay 10
144. registration_page Registration
145. remove_onlyadmins 0
146. rename_globalacl Admins
147. reverse_proxy 0
148. reverse_proxy_addresses
149. reverse_proxy_header
150. review 0
151. rewrite_mode 1
152. root_page HomePage
153. search_page Search
154. session_length 30
155. session_store 1
156. show_permalink 1
157. show_spaces 1
158. site_desc Cover what you do best. Link to the rest.
159. site_favicon
160. site_logo wacko_logo.png
161. site_name MyWikiSite
162. smtp_connection_mode
163. smtp_host localhost
164. smtp_password
165. smtp_port 587
166. smtp_username
167. sorting_comments 0
168. source_handler 1
169. spam_filter 1
170. standard_handlers addcomment,admin\.php,attachments,categories,claim...
171. store_deleted_pages 1
172. system_message
173. system_message_type
174. tag_page Tag 
175. terms_page
176. theme default
177. timezone 0
178. time_format H:i
179. time_format_seconds H:i:s
180. tls  0
181. tls_implicit 0
182. tree_level 1
183. upload admins
184. upload_banned_exts cgi,js,php,php3,php4,php5,php7,pl,py,ssi,jsp,pht,p...
185. upload_images_only 0
186. upload_max_size 52428800
187. upload_quota 0
188. upload_quota_per_user 5368709120
189. upload_translit 1
190. urls_underscores 0
191. username_chars_max 20
192. username_chars_min 3
193. users_page Users
194. user_can_delete_account 0
195. xml_sitemap 1
196. xml_sitemap_time 0
197. xml_sitemap_update
198. 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 set as DEFAULT value in the table itself.


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 this three lines, PLEASE-PLEASE. In fact, don't change anything! Ever!
const WACKO_VERSION			= '6.0.0';
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.0.5', 'mysql' => '5.6.4'];

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