$_default_config
$_default_config :
Core configuration defaults.
As always, you must not change this file. Instead, you have two levels of customization, merged in the order listed here:
Site-specific configuration:
MidCOM will include the file midcom::get()->config->get('midcom_config_basedir') . /midcom.conf which must be a regular PHP file. You may populate the global array $midcom_config_site in this file. It should list all options that apply to all installations (like the Cache backend selection or the indexer host).
Example:
$GLOBALS['midcom_config_site']['cache_module_content_backend'] =
['directory' => 'content/', 'driver' => 'sqlite'];
Instance-specific configuration:
After including the site itself, MidCOM also merges the contents of the global array $midcom_config_local, which may hold configuration data for the website itself.
These settings must be set for all sites:
You will usually include these lines somewhere before actually including MidCOM.
$GLOBALS['midcom_config_local']['midcom_root_topic_guid'] = '123456789...';
Configuration setting overview:
The following configuration options are available for the MidCOM core along with their defaults, shown in alphabetical order:
Authentication configuration
Authentication Backend configuration: "simple"
Cache configuration
array cache_autoload_queue: The cache module loading queue during startup, you should normally have no need to change this (unless you want to add your own caching modules, in which case you have to ensure that the loading queue of MidCOM itself (as seen in this file) is not changed.
string cache_base_directory: The directory where to place cache files for MidCOM. This defaults to /tmp/ (note the trailing slash) as this is writable everywhere.
Array cache_module_content_backend: The configuration of the content cache backend. Check the documentation of midcom_services_cache_backend of what options are available here. In general, you should use this only to change the backend driver. In all other cases you should leave this option untouched. The defaults are to store all cache databases into the 'content/' subdirectory of the cache base directory.
string cache_module_content_name: The identifier, the content cache should use for naming the files/directories it creates. This defaults to a string constructed out of the host's name, port and prefix. You should only change this if you run multiple MidCOM sites on the same host.
boolean cache_module_content_uncached: Set this to true if you want the site to run in an uncached mode. This is different from cache_disable in that the regular header preprocessing is done anyway, allowing for browser side caching. Essentially, the computing order is the same (no_cache for example is considered like usual), but the cache file is not stored. This defaults to false.
string cache_module_content_headers_strategy: Valid values are
'no-cache' activates no-cache mode that actively tries to circumvent all caching
'revalidate' is the default which sets 'must-revalidate' and presses the issue by setting Expires to current time
'public' and 'private' enable caching with the cache-control header of the same name, default expiry timestamps are generated using the cache_module_content_default_lifetime
int cache_module_content_default_lifetime: How many seconds from now to set the default Expires header to, defaults to 15 minutes. Also used as default expiry time for content-cache entries that have no expiry set.
string cache_module_content_headers_strategy_authenticated: Defaults to 'private', this is equivalent to cache_module_content_headers_strategy but applies when we have authenticated user.
int cache_module_content_default_lifetime_authenticated: defaults to 0, equivalent to cache_module_content_default_lifetime but applies to authenticated users (except this does not set content-cache expiry). These two options are added to combat braindead proxies.
string cache_module_content_caching_strategy: Valid values are
'user' the "classic" mode, per user content-cache, default
'memberships' cache per group memberships (users that have same memberships share same cache), for many cases this should offer more performance and smaller cache but if you use per-user privileges or other user specific processing this will cause hard-to-debug issues
'public' everything goes to single public cache, disabling logins altogether will likely be safer.
Array cache_module_nap_backend: The configuration of the nap/metadata cache backend. Check the documentation of midcom_services_cache_backend of what options are available here. In general, you should use this only to change the backend driver. In all other cases you should leave this option untouched. The defaults are to store all cache databases into the 'nap/' subdirectory of the cache base directory. The databases are named after the root topic guid, which should be sufficient in all cases. If you really want to separate things here, use different directories for the backends.
string cache_module_memcache_backend: The cache backend to use for the memcache caching module. The default is null, which disables the module entirely. This is the default. If you have both memcached and the memcached PHP extension installed, set this to 'memcached', to enable the cache.
Array cache_module_memcache_backend_config: The backend configuration to use if a backend was specified. See the individual backend documentations for more information about the allowed option set. This defaults to an empty array.
Array cache_module_memcache_data_groups: The data groups available for the memcache module. You should normally not have to touch this, see the memcache module documentation for details. This defaults to ['ACL', 'PARENT'].
See also midcom_services_cache, the midcom_services_cache_backend class hierarchy and the midcom_services_cache_module class hierarchy.
Indexer configuration
Indexer backend configuration: SOLR module
Logging configuration
array error_actions: Actions to run when a specific error code is produced. This can be used for saving logs about 404 errors from broken links, or sending an error 500 to webmaster for analysis.
Configuration example:
$GLOBALS['midcom_config_local']['error_actions'] = array
(
500 => array
(
'action' => 'email',
'email' => 'webmaster@example.net',
),
404 => array
(
'action' => 'log',
'filename' => '/var/log/broken_links.log',
),
);
MidCOM Core configuration
RCS system
string midcom_services_rcs_bin_dir: the prefix for the rcs utilities (default: /usr/bin) string midcom_services_rcs_root : the directory where the rcs files get placed. (default: must be set!) boolean midcom_services_rcs_enable: if set, midcom will fail hard if the rcs service is not operational. (default: false)
Style Engine
Toolbars System
The CSS classes and IDs used by the toolbars service can be configured using these options:
Utility Programs
The various paths set here lead to the utility programs required by MidCOM, both mandatory and optional applications are listed here. To indicate that a certain application is unavailable, set it to null. The defaults assume that the files are within the $PATH of the Apache user and should be sufficient in most cases. Package maintainers are encouraged to make the paths explicit.
Visibility settings (NAP and DBA)