System configuration | |
Introduced in Tiki8
New in Tiki10: Option to load the modules from a static files ( in profile YAML format like http://profiles.tiki.org/Module+Handler ). Search for "Module file" in the admin panel New in Tiki11: A file db/preconfiguration.php can contain database credentials which are suggested at first Tiki installation. This allows providers of Virtual Servers to preconfigure mysql with different random passwords and usernames before the customers access the Tiki installer. New in Tiki15: Due to changes in Zend libraries, it is no longer possible to have hierarchical setting of configurations as before. In addition, configuration names can no longer contain dots. For example, client1.example.com will not work. Use client1 instead. Old configurations may not be usable in Tiki 15 and have to be rewritten.
New in Tiki20: Permit to hide preferences from admin panel New in Tiki22: Risky preferences are now hidden by default (System Administrator can un-hide)
|
Possible uses for Tiki Farms and hosting companies | |
|
Activate the system configuration | |
The system configuration must be enabled from the db/local.php file. Installations created from Tiki8 and beyond contain samples in the file created by default. Sample configuration in db/local.php to an absolute path $system_configuration_file = '/etc/tiki.ini'; $system_configuration_identifier = 'client1';
Another sample configuration in db/local.php, with a relative path $system_configuration_file = 'db/tiki.ini.php'; $system_configuration_identifier = 'client1'; If you do this example, make sure .htaccess is active so the tiki.ini.php can't be read or better yet, ensure it is called tiki.ini.php and refer to section Protecting the system configuration below. Another sample configuration in db/local.php, with a relative path pointing outside the web accessible directory $system_configuration_file = 'db/../../tiki.ini.php'; $system_configuration_identifier = 'client1'; If you do this example, put tiki.ini.php above the web directory. Ex.: if your db/local is here:
|
System configuration files contents | |
INI file example #1 preference.browsertitle = Test
Sample INI file [global] preference.feature_wysiwyg = "n" preference.feature_sefurl = "y" preference.helpurl = "http://support.example.com/" ; ... more settings ... [basic : global] ; ... this hierarchical block no longer works from Tiki 15 onwards preference.feature_wiki = "y" preference.feature_forums = "n" preference.feature_trackers = "n" ; ... more settings ... [pro : global] ; ... this hierarchical block no longer works from Tiki 15 onwards preference.feature_wiki = "y" ; BBB configured, but user can still toggle on/off preference.bigbluebutton_server_location = "bbb.example.com" preference.bigbluebutton_server_salt = "1234abcd1234abcd" ; ... more settings ... [client1 : pro] ; ... this hierarchical block no longer works from Tiki 15 onwards, but [client1] will preference.browsertitle = "Client #1 Intranet" preference.sender_email = client1@example.com
|
Protecting the system configuration file(s) | |
Note that will work only if your files filename contain Sample INI.PHP file. Eg. tiki.ini.php [global] preference.feature_wysiwyg = "n" preference.feature_sefurl = "y" preference.helpurl = "http://support.example.com/" ; ... more settings ...
|
Disable classes of preferences | |
Preferences can be disabled by setting a value to each of them individually. However, this process may be long and will require maintenance with the evolutions of Tiki. Tiki allows to set multiple rule priorities, each verification priority can allow or deny a preference. Rules can be specified at various levels, just like the preference overrides above. Various rules [global] rules.0 = deny experimental new [pro : global] ; ... this hierarchical block no longer works from Tiki 15 onwards rules.5 = allow new rules.10 = allow feature_wysiwyg
A draconian provider could use something like this: Draconian provider configuration [global] rules.0 = deny all rules.1 = allow basic
Hide classes of preferences that are disabled
Hide preferences rules [global] rules.0 = hide experimental new
|
Array syntax | |
Instead of… preference.flaggedrev_approval_categories = "40;41;97;231"
How to set an array preference.flaggedrev_approval_categories.0 = "40" preference.flaggedrev_approval_categories.1 = "41" preference.flaggedrev_approval_categories.2 = "97" preference.flaggedrev_approval_categories.3 = "231"
How to set an array preference.flaggedrev_approval_categories[] = "40" preference.flaggedrev_approval_categories[] = "41" preference.flaggedrev_approval_categories[] = "97" preference.flaggedrev_approval_categories[] = "231"
|
Preconfiguration file | |
All there is to do is uncomment the appropriate lines in file db/preconfiguration.php and fill the appropriate values: db/preconfiguration.php |
Environment variable configuration | |
Sample nginx configuration fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index route.php; include fastcgi_params; fastcgi_param MYSQLCONNSTR_Tiki "Database=client1;Data Source=localhost;User Id=client1;Password=secret"; fastcgi_param TIKI_INI_FILE "/etc/tiki.ini"; fastcgi_param TIKI_INI_IDENTIFIER "client1";
Related
|