I
I
Ilya Malinovsky2018-12-05 20:21:27
PHP
Ilya Malinovsky, 2018-12-05 20:21:27

How to fix error from php console?

Good afternoon! There is a site on Bitrix, you need to transfer agents to kroner, I used to do this and everything turned out with periodic success. But now I'm facing the next problem.
I have the following php file

<?
$_SERVER["DOCUMENT_ROOT"] = realpath(dirname(__FILE__)."/../..");
$DOCUMENT_ROOT = $_SERVER["DOCUMENT_ROOT"];
define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS",true); 
define('CHK_EVENT', true);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");

@set_time_limit(0);
@ignore_user_abort(true);

CAgent::CheckAgents();
define("BX_CRONTAB_SUPPORT", true);
define("BX_CRONTAB", true);
CEvent::CheckEvents();

if (CModule::IncludeModule("subscribe"))
{
      $cPosting = new CPosting;
      $cPosting->AutoSend();
} 
?>

I run this script on cron every 10 minutes. But he doesn't fuss. Why in isp manager and through the console tried to run
php -f путь до корня/bitrix/php_interface/cron_events.php

As a result, no errors were received. by writing the echo command in different parts of the script, I realized that the output stops working after the line
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");

Error output is enabled in cli php, version php 5.4
Tell me what to do with all this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Malinovsky, 2018-12-05
@iliya936

The problem was solved by upgrading the php cli to version 5.6 + removing the connection of third-party modules from init.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question