A
A
Alexey Bille2018-08-25 14:40:19
1C-Bitrix
Alexey Bille, 2018-08-25 14:40:19

How to connect lumen to Bitrix?

Created a lumen project in the api folder
In the api folder created a .htaccess file with the content:
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
In api/bootstrap/app.php I connected the Bitrix core
require($_SERVER["DOCUMENT_ROOT" ] . "/bitrix/modules/main/include/prolog_before.php");
Vendors are connected in local/php_interface/init.php I
go to the site using url /api/
An error appears
/bitrix/modules/main/classes/general/main.php
ErrorException (E_NOTICE)
Undefined index: SPREAD_COOKIE
How to disable in laravel\lumen notice?
Modifying the kernel\vendor folder is not an option.
Tried to add error_reporting(0); in /api/boostrap/app.php; - Does not help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Theo Vrbata, 2018-10-18
@thevrbata

Move require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); to the file /bootstrap/app.php before routing, and everything will work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question