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

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 config_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  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_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. edit_summary 0
60. email_from WackoWiki
61. email_priority 3
62. enable_captcha 1
63. enable_comments 1
64. enable_counters 1
65. enable_email 1
66. enable_email_notification 1
67. enable_feeds 1
68. enable_license 0
69. enable_referrers 0
70. enable_security_headers 1
71. enable_system_message 1
72. export_handler 2
73. ext_bad_behavior 0
74. footer_comments 1
75. footer_files 1
76. footer_tags 1
77. form_token_time 7200
78. forum_cluster Forum
79. forum_topics 10
80. groups_page Groups
81. help_page
82. hide_index 0
83. hide_locked 1
84. hide_revisions 0
85. hide_toc 0
86. img_create_thumbnail 0
87. img_max_thumb_width 150
88. index_page PageIndex
89. intercom_delay 30
90. ip_login_limit_max 50
91. keep_deleted_time 0
92. language en 
93. license
94. link_target 0
95. list_count 50
96. log_default_show 1
97. log_level 0
98. log_purge_time 0
99. login_page Login
100. logo_display 0
101. logo_height 50
102. logo_width 108
103. maint_last_cache 1655718895
104. maint_last_delpages 1
105. maint_last_log 1
106. maint_last_oldpages 1
107. maint_last_refs 1655804710
108. maint_last_session 1655888853
109. maint_last_update 2022-06-01 09:14:02
110. maint_last_xml_sitemap 1
111. max_login_attempts 3
112. menu_items 5
113. minor_edit 0
114. multilanguage 1
115. name_date_macro %s (%s)
116. news_cluster
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_globalacl 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. session_length 30
158. session_notice 1
159. session_store 1
160. show_permalink 1
161. show_spaces 1
162. site_desc Cover what you do best. Link to the rest.
163. site_favicon
164. site_logo wacko_logo.png
165. site_name MyWikiSite
166. smtp_auto_tls 1
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. theme_color
183. time_format HH:mm
184. time_format_seconds HH:mm:ss
185. timezone UTC 
186. tls  0
187. tls_implicit 0
188. tree_level 1
189. upload admins
190. upload_banned_exts asax|asa|ascx|ashx|asmx|aspx|asp|axd|...
191. upload_images_only 1
192. upload_max_size 512000
193. upload_quota 0
194. upload_quota_per_user 104857600
195. upload_translit 1
196. urls_underscores 0
197. user_can_delete_account 0
198. username_chars_max 20
199. username_chars_min 3
200. users_page Users
201. xml_sitemap 0
202. xml_sitemap_gz 0
203. xml_sitemap_time 1
204. xml_sitemap_update
205. 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 three lines, PLEASE-PLEASE. In fact, don't change anything! Ever!
const WACKO_VERSION			= '6.1.12';
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 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

Read comments (0 comments)