Answer the question
In order to leave comments, you need to log in
Why is the composer not connected to Bitrix?
I can’t connect the composer to Bitrix in any way, I seem to have done everything as in this article https://dev.1c-bitrix.ru/community/webdev/user/137... But I get an error
Fatal error: require_once(): Failed opening required '/home/bitrix/www/vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/bitrix/www/local/php_interface/init.php on line 3
require_once $_SERVER['DOCUMENT_ROOT'] . '/vendor/autoload.php';
Answer the question
In order to leave comments, you need to log in
You do not find the /vendor/autoload.php file itself.
In general, the actions are correct. Perhaps the server is configured incorrectly or the $_SERVER['DOCUMENT_ROOT'] value is overwritten in init.php.
Check that the working directory of the site is on the server along the path "/home/bitrix/www"
Are you sure the file exists?
Try to put not a bare require_once, but with a check
if ( file_exists($_SERVER['DOCUMENT_ROOT'] . '/vendor/autoload.php') )
{
require_once($_SERVER['DOCUMENT_ROOT'].'/vendor/autoload.php');
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question