Skip to content

Instantly share code, notes, and snippets.

@vmrfriz
Last active April 5, 2024 20:33
Show Gist options
  • Save vmrfriz/85b1f4eed30b138f24275516a3f2e22d to your computer and use it in GitHub Desktop.
Save vmrfriz/85b1f4eed30b138f24275516a3f2e22d to your computer and use it in GitHub Desktop.
Bitrix solutions

Решения проблем в Битрикс

Ссылки на документацию

Приложения в Маркетплейсе

Чтение (дебаг) больших массивов

Подключение PHP-библиотеки kint-php

mkdir -p /local/php_interface/
cd local/php_interface/
composer require kint-php/kint --dev

Вставить в начало файла local/php_interface/init.php:

require_once __DIR__.'/vendor/autoload.php';

Сброс двухэтапной аутентификации (OTP)

DELETE FROM `b_sec_user` WHERE `USER_ID` = (SELECT `ID` FROM `b_user` WHERE `LOGIN` LIKE 'vvgrechukha@1cbit.ru' LIMIT 1);

заменить vvgrechukha@1cbit.ru на логин аккаунта, где нужно сбросить OTP

Поиск по коду на сервере

Поиск с помощью утилиты grep

grep --include="*.php" --exclude-dir="cache" --exclude-dir="managed_cache" --exclude-dir="install" --exclude="*.min.*" --exclude="*.map.*" -ir "Искомый текст"

Сохранение выгрузки 1С

Добавить строку в /bitrix/php_interface/dbconn.php

define("BX_CATALOG_IMPORT_1C_PRESERVE", true);

Авторизация в 1С-Битрик без пароля

require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
global $USER;
$USER->Authorize(1);
// shell_exec('rm '.__FILE__); // удаление текущего файла
header('Location: /bitrix/admin/index.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment