: 18252 (Data available since 06.02.2017)
: 14.12.2015

Settings in a new core are made in the file /bitrix/.settings.php. Let us remember that in the old core similar settings were made in the file \bitrix\php_interface\dbconn.php. The file .settings.php differs significantly from the former dbconn.php in terms of structure.

Parameters may be edited using the Configuration class (Bitrix\Main\Config\Configuration).

Note: Some sections of the setting file contain the read only parameter. This parameter means that these settings will not be amended through API.

Description of Parameters

Parameters that may be changed are described below:


Cache Section

Is responsible for caching settings and permits to set the caching method and its parameters.

  'cache' => array (
    'value' => array (
      'type' => 'files',
    ),
    'readonly' => false,
  ),
Parameter Value
type The following can be set as values:
  • memcache
  • eaccelerator
  • apc
  • xcache
  • files
  • none
or indicate arrays with values:
  • class_name - a class implementing ICacheEngine interface,
  • required_file - an add-on file with a path starting from bitrix or local (if required),
  • required_remote_file - an add-on file with an absolute path (if required),

Note: In addition to type there may be additional parameters if a specific caching class requires them.

Note: The memcache settings may also be set in the file /bitrix/.settings_extra.php.

File example /bitrix/.settings_extra.php



Section exception_handling

Responsible for exception handling.

  'exception_handling' => array (
    'value' => array (
      'debug' => false,
      'handled_errors_types' => E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE,
      'exception_errors_types' => E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_USER_WARNING & ~E_USER_NOTICE & ~E_COMPILE_WARNING,
      'ignore_silence' => false,
      'assertion_throws_exception' => true,
      'assertion_error_type' => 256,
      'log' => array (
        'settings' => array (
          'file' => 'bitrix/modules/error.log',
          'log_size' => 1000000,
        ),
      ),
    ),
    'readonly' => false,
  ),
Parameter Value
debug The key is responsible for displaying an error on a browser page. Errors should be displayed only at the development or debugging stage. Otherwise, there is a potential risk of information disclosure.
handled_errors_types This key is intended for setting error types to be caught by the system (not ignored).
exception_errors_types The key sets error types for which the system gives an exception.
ignore_silence The key cancels action of the error management operator (@).
log The key sets error logging parameters. If there is no key, there will be no logging. If set as in the example:
'log' => array (
   'settings' => array (
      'file' => 'bitrix/modules/error.log',
      'log_size' => 1000000,
   ),
),
the logging will be made into a file and its size will be limited.
If set in a general case, logging can be made to anywhere:
'log' => array(
   'class_name' => 'MyLog', // custom log class, must extends ExceptionHandlerLog; can be omited, in this case default Diag\FileExceptionHandlerLog will be used
   'extension' => 'MyLogExt', // php extension, is used only with 'class_name'
   'required_file' => 'modules/mylog.module/mylog.php' // included file, is used only with 'class_name'
   'settings' => array( // any settings for 'class_name'
      ),
),


Section connections

Database and other data source connection parameters. The class name and connection parameters are set.

  'connections' => array (
    'value' => array (
      'default' => array (
        'className' => '\\Bitrix\\Main\\DB\\MysqlConnection',
        'host' => 'localhost:31006',
        'database' => 'admin_bus',
        'login' => 'admin_bus',
        'password' => 'admin_bus',
        'options' => 2,
      ),
    ),
    'readonly' => true,
  ),
);
Parameter Value
options Checkboxes of persistent connection and deferred connection with the database.


Courses developed by «Bitrix», Inc.