Answer the question
In order to leave comments, you need to log in
Errors when moving to another hosting 1s bitrix, php 7?
Site on 1s Bitrix, I had to move to another hosting.
Mistakes appeared after the move. On the old hosting it worked on php 7, after moving to php 5.6 there are no errors, but if we turn on php 7, after authorization of the store manager (who can only process orders), the following error appears: An error occurred when executing the script: "Enable extended error output in settings file .settings.php", naturally include it in .settings,php 'debug' => true
and see the following error:
[Error]
Using $this when not in object context (0)
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/main/classes/mysql/database_mysqli.php:71
#0: CDatabase::ForSql(string)
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/classes/general/clearnaccess.php:1013
#1: CLearnAccess::EscapeAndAddLateralQuotes(string)
#2: array_map(array, array)
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/classes/general/clearnaccess.php:1003
#3: CLearnAccess::Array2CommaSeparatedListForSQL(array)
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/classes/general/clearnaccess.php:829
#4: CLearnAccess->GetBitmaskOperationsForAllLessons(array)
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/classes/general/clearnaccess.php:401
#5: CLearnAccess->IsBaseAccess(integer)
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/classes/general/clearnaccessmacroses.php:484
#6: CLearnAccessMacroses::CanViewAdminMenu()
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/admin/menu.php:276
#7: include(string)
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/main/interface/admin_lib.php:640
#8: CAdminMenu->_IncludeMenu(string)
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/main/interface/admin_lib.php:418
#9: CAdminMenu->Init(array)
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/main/interface/desktop.php:6
#10: require(string)
/home/a/antonprk/pampersok.ru/public_html/bitrix/admin/index.php:2
Answer the question
In order to leave comments, you need to log in
Bitrix version what: 10?
On versions 16+ it works fine with 7.0.
Version 7.1 works with jambs, but according to the TP on version 17 everything is ok.
And this error is a call to `$this` in a static method.
A gross error in the code, $this was used in a static method (this has always been highly discouraged, and is no longer possible in new versions of PHP).
Update your Bitrix, preferably with alternatives.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question