The main.inc file is the primary configuration file for MySource Matrix. Many of these configuration settings can be altered from the administration interface as the root user or a system administrator, but others must be manually edited as they are considered too critical to the stability of the system (such as database settings). The main.inc configuration file is found in the /path/to/matrix/data/private/conf directory.
Each configuration setting in the main.inc file is listed on this page with an explanation and an example configuration value. Some configuration settings should not be changed from their default settings. Where advised, leave the default settings unless you really know what you are doing.
The table below lists the main.inc configuration settings for MySource Matrix. The Editable column indicates if the configuration setting is editable from the MySource Matrix administration interface. A value of No indicates that the setting must be changed directly within the main.inc file.
Click on a configuration setting for more information.
This list of configuration variables is current as of version 3.16.0. Earlier versions will not have all of these variables in the main.inc file.
The database configuration settings define the connection strings that allow MySource Matrix to connect to its database. More information about DSNs can be found in the PostgreSQL DB setup guide and the Oracle DB setup guide.
define('SQ_CONF_DB_DSN', 'pgsql://developers@db/matrix');
define('SQ_CONF_DB2_DSN', 'pgsql://developers@db/matrix');
define('SQ_CONF_DB3_DSN', 'pgsql://developers_secondary@db/matrix');
define('SQ_CONF_DBCACHE_DSN', 'pgsql://developers@db/matrix');
These settings specify the maximum amount of memory used by MySource Matrix's Web and Cron systems, in megabytes. Each setting defaults to 16 MB, however on larger and more complex systems, this limit will probably need to be increased.
define('SQ_CONF_WEB_MEMORY_LIMIT', 16);
define('SQ_CONF_CRON_MEMORY_LIMIT', 16);
MySource Matrix overrides some PEAR packages to fix minor errors that have not been fixed in the official release of the package. These overridden packages are placed into the directory defined in this configuration setting.
It is highly recommended that you do not alter the default value of this configuration setting.
define('SQ_CONF_PEAR_PATH', SQ_SYSTEM_ROOT.'/php_includes');
If true, MySource Matrix will log all errors generated on the frontend and editing interfaces to an error log.
It is highly recommended that you do not alter the default value of this configuration setting.
define('SQ_CONF_LOG_ERRORS', true);
This setting defines the extension that all log files will receieve.
It is highly recommended that you do not alter the default value of this configuration setting.
define('SQ_CONF_LOG_EXTENSION', '.log');
There are two main log files in MySource Matrix. The system log is an audit trail of all activity that occurs within the MySource Matrix editing interfaces. The error log is a record of all errors that are generated on the frontend and editing interfaces.
These configuration setting define the names of these log files. The file extension should not be specified.
It is highly recommended that you do not alter the default values of these configuration settings.
define('SQ_CONF_LOG_FILE_SYSTEM', 'system');
define('SQ_CONF_LOG_FILE_ERROR', 'error');
This setting defines whether errors are hidden on the frontend for site visitors. The default value will display error messages to site visitors. This may not be desirable in a production system and may be disabled.
define('SQ_CONF_ERRORS_HIDE_FRONTEND', false);
This setting defines a list of URLs that can be used to access MySource Matrix. All Site assets created within MySource Matrix must have a URL that is based on a system root URL.
Each URL is defined on a new line, except in the case where only one system root URL is defined. The protocol (http:// or https://) should not be specified.
define('SQ_CONF_SYSTEM_ROOT_URLS', 'www.example.com');
or for a system with multiple system root URLs
define('SQ_CONF_SYSTEM_ROOT_URLS', 'www.example.com
web01.example.com
web02.example.com
store.example.com
secure.example.com');
These settings define the suffixes that are appended to a MySource Matrix URL to access the editing interfaces. The backend suffix is used to access the administration interface while the limbo suffix is used to access the simple editing interface.
define('SQ_CONF_BACKEND_SUFFIX', '_admin');
define('SQ_CONF_LIMBO_SUFFIX', '_edit');
You can disable access to the administration interface for all users by clearing the value of the SQ_CONF_BACKEND_SUFFIX configuration setting. Similarly, you can disable all access to the simple editing interface by clearing the value of the SQ_CONF_LIMBO_SUFFIX.
define('SQ_CONF_BACKEND_SUFFIX', '');
define('SQ_CONF_LIMBO_SUFFIX', '');
This setting defines the suffix to be appended to the URL of a page so that you can log in. Using this suffix will mean that the MySource Matrix login box will appear where you can enter your username and password. Instead of going to the Administration or Simple Edit Interface however, you will be returned to the page you were currently viewing. For example, if you are viewing the "Contact Us" page on your site and you append "_login" onto the end of the URL, the login box will appear. Once you have entered your username and password, you will be returned to the "Contact Us" page.
define('SQ_CONF_LOGIN_SUFFIX', '_login');
The SQ_CONF_LOGIN_SUFFIX is useful if you have information or tools on your site that you only want certain users to view but you do not want to add a login box into your design so they can access them.
This setting defines a list of parent domains to use for setting session cookies. Parent domains are useful if several system root URLs have a common parent domain (eg syd.example.com and melb.example.com). If the current URL ends with one of the parent domains then the cookie will be set on the parent domain instead, with the result that the user's session will persist across the parent domain and all its subdomains.
Each parent domain is defined on a new line, except in the case where only one parent domain is defined. The protocol (http:// or https://) should not be specified.
define('SQ_CONF_SYSTEM_ROOT_URLS', 'example.com');
or for a system with multiple parent domains
define('SQ_CONF_SYSTEM_ROOT_URLS', 'example.com
squiz.net
mydomain.com.au');
These configuration settings can be used to offload static file serving to an alternative web server, reducing the load on the main web server used by MySource Matrix.
By default, MySource Matrix rewrites URLs for publicly accessible and live file-based assets to an Apache readable directory on the same server that MySource Matrix is installed on. Configuring this option will tell MySource Matrix to rewrite those URLs to an alternative location, which could be a different (and lightweight) piece of web server software on the same machine as the MySource Matrix install, or a completely different machine. Leave this configuration setting empty to use the default MySource Matrix behaviour.
The additional static URL configuration settings define whether the static files can be served using the http:// or https:// protocols.
define('SQ_CONF_STATIC_ROOT_URL', '');
define('SQ_CONF_STATIC_ROOT_HTTP', true);
define('SQ_CONF_STATIC_ROOT_HTTPS', false);
This setting defines the character used to replace spaces in the names of assets when automatically generating web paths. For example, an asset with the name Contact Us would have an automatically generated web path of content_us, where the space has been replaced by the web path separator.
define('SQ_CONF_WEB_PATH_SEPARATOR', '_');
This setting defines whether rollback is enabled within the MySource Matrix system.
define('SQ_CONF_ROLLBACK_ENABLED', '0');
By default, if a user's IP address changes while they are using MySource Matrix, they will be logged out to ensure their account is not being used by someone else at the same time. Proxy settings in some companies may change the IP address of the user each time they view a MySource Matrix page, effectively logging out the user each time they try and navigate to a new page.
Enabling this setting will tell MySource Matrix to allow a user's IP address to change throughout their session.
define('SQ_CONF_ALLOW_IP_CHANGE', false);
This setting defines the number of times a user may incorrectly enter their password before their account is locked. Note that this setting does not apply to the root user account, which is never locked.
define('SQ_CONF_MAX_LOGIN_ATTEMPTS', 3);
This setting controls whether MySource Matrix should use a user name sent from an external authentication mechanism (for example, an authentication system provided by a web server or a proxy) to automatically log in a user, without them having to enter their password directly into the Matrix system. MySource Matrix will assume the user has been successfully authenticated from the external system, and does not check the password entered during the original authentication against their MySource Matrix password.
In version 3.12.0 RC1 and later, this setting uses the server variable set in the SQ_CONF_HTTP_LOGIN_VAR configuration setting. In earlier versions, the server variable used was REMOTE_USER - which is used by Apache for standard HTTP authentication - and could not be changed.
define('SQ_CONF_ALLOW_HTTP_LOGIN', false);
If a user has previously entered their username and password in a standard HTTP authentication form, MySource Matrix will be provided with the username and password they entered. If this setting is enabled, MySource Matrix will attempt to log the user into the system using the username and password combination provided without requiring them to retype their username and password. The password stored within MySource Matrix must match the password entered during the initial HTTP authentication.
define('SQ_CONF_ACCEPT_HTTP_CREDS', false);
Select whether or not to use the default PHP session file save path (as specified in the php.ini configuration file), or let Matrix set it to the cache folder of the Matrix system. The former may be required when using shared storage, ie. with multiple Matrix servers, while the latter is required of site networks to operate.
This option should only be changed by advanced users. If you change this option all users who are currently logged in will be immediately logged out of their session.
define('SSQ_CONF_USE_DEFAULT_SESSION_SAVE_PATH', false);
This setting controls whether external authentication systems (LDAP and IPB Bridges) are enabled when authenticating a user. When this option is disabled by setting to '0', only the Default Authentication asset will be returned from the Authentication Systems folder (inside System Management). This allows a system administrator to temporarily disable external authentication in certain circumstances, for example, if an external system is compromised.
define('SQ_CONF_ENABLE_EXTERNAL_AUTH_SYSTEMS', '1');
This setting controls the PHP server variable used to authenticate external users, if the SQ_CONF_ALLOW_HTTP_LOGIN setting is turned on. There are two common value types for this setting:
define('SQ_CONF_HTTP_LOGIN_VAR', 'REMOTE_USER');
This setting accepts a list of System Root URLs, as entered in the SQ_CONF_SYSTEM_ROOT_URLS setting. System Root URLs listed in this setting will attempt to display the login box using HTTPS protocol, regardless of other protocol settings on the site. Like the SQ_CONF_SYSTEM_ROOT_URLS setting, this is stored as a newline-delimited ("\n") string.
define('SQ_CONF_FORCE_SECURE_LOGIN_URLS', '');
This setting defines how often the top frame refreshes in the administration and simple editing interfaces. The refreshing of this frame reacquires locks that the user still needs. The value is a number of seconds.
The value of this setting should be lower than the value of SQ_CONF_LOCK_LENGTH to ensure locks do not expire while users are editing content.
define('SQ_CONF_REFRESH_INTERVAL', 120);
This setting defines how long a lock is held before expiring. For example, if a user locks a page and then decides they do not want to edit it any more, the lock will be released automatically after the number of seconds defined in this configuration setting.
define('SQ_CONF_LOCK_LENGTH', 600);
When an asset is expanded in the asset map, a set number of child assets are shown before the next button is displayed to view the next set of child assets. This setting defines how many child assets are shown at the one time.
define('SQ_CONF_ASSET_MAP_ASSET_LIMIT', 50);
This setting controls the display name of assets within the asset map. It defaults to the short name of the asset, however this can be modified to display other information such as asset ID and number of children. The following keywords can be used, alongside other formatting:
define('SQ_CONF_ASSET_MAP_ASSET_DISPLAY_NAME', '%asset_short_name%');
This setting defines the text displayed on the commit button in the administration and simple editing interfaces.
define('SQ_CONF_COMMIT_BUTTON_TEXT', 'Commit');
This setting defines the number of seconds that a user's session file can be idle before it is deleted by PHP.
More information about the PHP session.gc_maxlifetime configuration option can be found on the PHP Session Handling Functions manual page.
It is highly recommended that you do not alter the default value of this configuration setting.
define('SQ_CONF_SESSION_GC_MAXLIFETIME', 604800);
This setting defines the number of seconds that a user can be idle before they are logged out automatically by MySource Matrix.
define('SQ_CONF_EDITING_TIME', 3600);
These settings define the way the linking system encodes asset tree IDs in the database.
It is highly recommended that you do not alter the default values of these configuration settings.
define('SQ_CONF_ASSET_TREE_BASE', 64);
define('SQ_CONF_ASSET_TREE_SIZE', 4);
These settings should not be modified after MySource Matrix has been installed. If they are changed, the MySource Matrix link tree must be recreated. If you don't know what that means, please don't touch these settings.
The locale used by the translation system to determine the language to be used for string translations.
define('SQ_CONF_DEFAULT_BACKEND_LOCALE', 'en_AU');
When MySource Matrix displays a page to a visitor, the language and character set used by the page is sent to the user's web browser. These settings can be configured on individual assets, but if the value has not been set the default system configuration settings are used.
define('SQ_CONF_DEFAULT_FRONTEND_LANGUAGE', 'en');
define('SQ_CONF_DEFAULT_CHARACTER_SET', 'iso-8859-1');
These settings allow you to define the name and the owner of your MySource Matrix system. This information is displayed at the bottom of all emails sent to MySource Matrix editors and administrators so they know who to contact for assistance.
define('SQ_CONF_SYSTEM_NAME', 'MySource Matrix');
define('SQ_CONF_SYSTEM_OWNER', 'Squiz.net');
This setting defines the email address that MySource Matrix will send emails to if it has not been supplied with an email address for the message. For example, a custom form that has been configured to send emails but not configured with an email address to send them to. This email address should be for the owner of the MySource Matrix installation.
define('SQ_CONF_DEFAULT_EMAIL', 'you@example.com');
This setting defines the email address that MySource Matrix will send technical emails to, such as error reports and system configuration changes. This email address should be for a user that is able to diagnose and fix technical problems with the MySource Matrix installation.
define('SQ_CONF_TECH_EMAIL', 'admin@example.com');
If enabled, MySource Matrix will send cacheable Cache-Control and Pragma headers for all public Live pages it serves to users who are not logged in. This allows the web browser to cache pages for faster browsing.
define('SQ_CONF_SEND_CACHEABLE_HEADER', true);
If enabled, MySource Matrix will send a last modified header for all publicly cached pages it serves to users who are not logged in.
define('SQ_CONF_SEND_LAST_MODIFIED_HEADER', false);
If enabled, MySource Matrix will send a 304 Not Modified code if requested to do so by a proxy. The 304 code will only be sent for publicly cached pages and for users who are not logged in.
define('SQ_CONF_SEND_NOT_MODIFIED_HEADER', false);
If enabled, MySource Matrix will send a no-cache Cache-control header for File asset types. This option can be disabled to resolve inline file display issues involving PDF documents in Internet Explorer.
define('SQ_CONF_SEND_NO_CACHE_HEADER', true);
If enable, pages returning a HTTP 404 not found response are cached by a caching proxy server. This option is separate from SQ_CONF_SEND_CACHEABLE_HEADER. The expiry time of the cached response is determined by the cache expiry setting on the Details screen of the Cache Manager.
define('SQ_CONF_SEND_404_CACHEABLE_HEADER', false);
This setting defines the suffix that is appended to a MySource Matrix URL to access the uncached version of the page. Using this suffix forces MySource Matrix to serve the most recent version of the page to the site visitor.
define('SQ_CONF_NOCACHE_SUFFIX', '_nocache');
These settings defines the maximum number of assets that can be stored in the internal MySource Matrix asset cache for web and CLI requests. A value of -1 indicates that there is no maximum.
It is highly recommended that you do not alter the default values of these configuration settings.
define('SQ_CONF_ASSET_CACHE_SIZE_WEB', -1);
define('SQ_CONF_ASSET_CACHE_SIZE_CLI', -1);
This setting defines the amount of debug information displayed within the system. Debug information is useful for diagnosing problems that may occur within your system.
This setting takes one of the following values:
define('SQ_CONF_DEBUG', 3);
In version 3.12.0 RC1, the contents of the data/private/assets directory was changed from a simple structure of directories named after asset IDs, to a two-level structure with the upper level of directories being a hash of the asset ID. (This is to avoid a limit of about 32,000 sub-directories in some filesystems.) This setting regulates the settings specify the number of these hash directories to use.
It is highly recommended that you do not alter the default values of these configuration settings, except in very large systems. If you do not expect to have more than around 640,000 of a certain asset type, do not alter this setting.
define('SQ_CONF_NUM_DATA_DIRS', 20);