Documentation

Special variables


Variable name Type Description
APPLICATION G Global object class CMain, designed for executing majority of shared standard operations (showing title, breadcrumb trail, menu and etc.).
USER G Global object class CUser, stores authorization data for current user. Intended for manipulating current user parameters.
DB G Global object class CDataBase, designed for handling a database.
DBType C database type: "mysql", "mssql" or "oracle".

Example:
$DBType = "mysql";
DBHost C For the following database types:
  • MySQL - database server address, for example, - "localhost"
  • Oracle - not used
Example:
$DBHost = "localhost";
$DBHost = "localhost:3307";
DBName С For the following database types:
  • MySQL - database name
  • 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 User login for database access.

Example:
$DBLogin = "root";
DBPassword C User password for database access.

Example:
$DBPassword = "123456";
DBDebug C
I
In case this variable is "true", an error when creating a database connection or in any SQL query - error message and the error's full text will be displayed in browser. Otherwise, full full error text will be displayed to the site admin only.

Example:
$DBDebug = true;
DBDebugToFile C
I
In case this variable is "true", all database SQL queries and their execution time will be written to log file /mysql_debug.sql (or /oracle_debug.sql). Usually, this option is used for getting data about on the execution speed of database SQL queries.

maintaining this log can seriously slow down site operation, that's why it's advised to use this option short-term.

Example:
$DBDebugToFile = true;
clear_cache P In case variable value is "Y", it disables caching on the current page.

Note: Only for users authorized with administrative privileges.

Example:
http://www.site.com/?clear_cache=Y
clear_cache_session P In case variable value is "Y", it disables caching within a session. You only have to assign the variable value as "N" once to enable caching.

Note: only for users authorized with administrative privileges.

Example:
http://site.com/?clear_cache_session=Y
http://site.com/?clear_cache_session=N
compress P In case variable value is "Y", the bottom of the page within a session will display a frame showing information on this page compression by the Compression module (no longer available in Bitrix24. Please configure compression at the web server level): page size before compression, page size post-compression, compression ratio. To disable this information display - just assign this constant as "N" once.

Example:
http://www.site.com/?compress=Y
http://www.site.com/?compress=N
show_page_exec_time P In case variable value is "Y", the bottom of the page will display page execution time at the server. This information will be printed within a session. To disable it, just define this variable as "N" once.

This variable allows getting current data on the site performance speed.

Example:
http://site.com/?show_page_exec_time=Y
http://site.com/?show_page_exec_time=N
show_include_exec_time P In case variable value is "Y", shows at the show execution time for all functions of CMain::IncludeFile, connecting both components and standard files. This information with be printed within a session. To disable it, just define this variable as "N" once.

Note: only for users authorized with administrative privileges.

Example:
http://site.com/?show_include_exec_time=Y
http://site.com/?show_include_exec_time=N
show_lang_files P In case variable value is "Y", the bottom of the page will display the list of language files used at this page with option to search them. This information will be displayed within a session. To disable it, just define this variable as "N" once.

This variable allows to quickly find a specific language phrase.

Example:
http://www.site.com/?show_lang_files=Y
http://www.site.com/?show_lang_files=N
no_keep_statistic_KEY P In case variable value is "Y", this will allow disabling statistics collection within a session. To disable statistics collection - just assign this constant as "N" once. Usually this variable is used for disabling statistics collection when admin visits the site.

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

Example:
http://site.com/?no_keep_statistic_SM4-ML-PZDIO7TUMT3WP7H=Y
http://site.com/?no_keep_statistic_SM4-ML-PZDIO7TUMT3WP7H=N
no_agent_statistic_KEY P In case variable value is "Y", this will allow to disable statistics processing agents within a session. To disable statistics collection - just assign this constant as "N" once.

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

Example:
http://site.com/?no_agent_statistic_SM4-ML-PZDIO7TUMT3WP7H=Y
http://site.com/?no_agent_statistic_SM4-ML-PZDIO7TUMT3WP7H=N
key   This variable can be used only when calling a script /bitrix/admin/phpinfo.php. If this value will be equal to license key, the abovementioned script is executed without connecting admin prolog.

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


Variable types legend:

  • G (global) - variable is automatically created in the prolog's service part
  • C (database connection) - variable can be defined only in the file storing database connection parameters: /bitrix/php_interface/dbconn.php
  • I (initializtion) - variable can be defined in one of the following files:
    • /bitrix/php_interface/init.php - additional Bitrix24 instance parameters
    • /bitrix/php_interface/site ID/init.php - additional site parameters
  • P (page) - variable can be specified in page parameters when opening it in browser


© «Bitrix24», 2001-2024