Bitrix Site Manager

Special variables

Variable name Type Description
APPLICATION G Global object of the class CMain. Used to perform common operations (display title, navigation chain, menu etc.)
USER G Global object of the class CUser. Stores the current user authorization data. Used to obtain and edit the current user parameters.
DB G Global object of the class CDataBase. Used to perform the database operations.
DBType C Type of the database: "mysql" or "oracle".

Example:$DBType = "mysql";
DBHost C Host name to connect to the database:
  • for MySQL - address of the database server, e.g. "localhost";
  • for Oracle - not used.
Example: $DBHost = "localhost"; $DBHost = "localhost:3307";
DBName C This variable contains different values for different database types:
  • for MySQL - database name;
  • for Oracle - connection string.
Example for MySQL:$DBName = "bitrix"; Example for Oracle: $DBName = " (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.1) (PORT = 1521) ) ) (CONNECT_DATA = (SERVICE_NAME = BX) ) ) ";
DBLogin C Login name to connect to the database.

Example:$DBLogin = "root";
DBPassword C Password to connect to the database.

Example:$DBPassword = "123456";
DBDebug C
I
If set to true, the browser will display the error message every time a database connection or SQL query error occurs. If set to false, full error description is visible to the site administrator only.

Example:$DBDebug = true;
DBDebugToFile C
I
If set to true, all SQL queries and the execution duration are logged in /mysql_debug.sql (or /oracle_debug.sql). This option can be used to obtain information on the SQL query execution speed.

The SQL log creation and maintenance slows down the site operation significantly. Use this option for debugging only.

Example:$DBDebugToFile = true;
clear_cache P Setting this variable to "Y" disables caching for the current page.

Only users with administrator rights can use this option.

Example:http://www.site.ru/?clear_cache=Y
clear_cache_session P Setting this variable to "Y" disables caching for the current session. To enable caching, set this parameter to "N" once.

Only users with administrator rights can use this option.

Example: http://www.site.ru/?clear_cache_session=Y http://www.site.ru/?clear_cache_session=N
compress P If set to "Y", a table is shown at the page bottom with information on the page compression achieved using the Compression module: uncompressed page size, compressed page size, compression ratio. This is the per-session directive. To hide the compression report, set this parameter to "N" once.

Example: http://www.site.ru/?compress=Y http://www.site.ru/?compress=N
show_page_exec_time P If set to "Y", a table is shown at the page bottom with information on the page execution duration on the server. This is the per-session directive. To hide the report, set this parameter to "N" once.

This variable allows to obtain the impartial information on the site speed.

Example: http://www.site.ru/?show_page_exec_time=Y http://www.site.ru/?show_page_exec_time=N
show_include_exec_time P If set to "Y", the page will display the total duration of execution of all methods CMain::IncludeFile. This method includes (connects) both components and common scripts. This is the per-session directive. To hide the report, set this parameter to "N" once.

Only users with administrator rights can use this option.

Example: http://site.ru/?show_include_exec_time=Y http://site.ru/?show_include_exec_time=N
show_lang_files P If set to "Y", a list of language files used by the page is shown at the page bottom. The language file list allows searching. This is the per-session directive. To hide the report, set this parameter to "N" once.

This variable allows to locate a language phrase quickly.

Example: http://www.site.ru/?show_lang_files=Y http://www.site.ru/?show_lang_files=N
no_keep_statistic_KEY P Setting this variable to "Y" disables collecting statistics within a session. To enable statistics, set this parameter to "N" once. This variable is mainly used to disable statistics when viewing the site by the administrator.

KEY is the license key stored in file /bitrix/license_key.php

Example: http://www.site.ru/?no_keep_statistic_SM4-ML-PZDIO7TUMT3WP7H=Y http://www.site.ru/?no_keep_statistic_SM4-ML-PZDIO7TUMT3WP7H=N
no_agent_statistic_KEY P Setting this variable to "Y" disables statistics agents within a session. To enable agents in this session, set this parameter to "N" once.

KEY is the license key stored in file /bitrix/license_key.php

Example: http://www.site.ru/?no_agent_statistic_SM4-ML-PZDIO7TUMT3WP7H=Y http://www.site.ru/?no_agent_statistic_SM4-ML-PZDIO7TUMT3WP7H=N
key   This variable can only be used when calling the script /bitrix/admin/phpinfo.php. If its value equals to the license key, this script is executed without the inclusion of the administrative prologue.

Example: http://www.site.ru/bitrix/admin/phpinfo.php?key=SM4-ML-PZDIRTH


Legend of variable types