Read FAQ
NEW
Bitrix24 Support
Registration and Authentication
How to start
My Profile
Feed
Messenger
Start page: the Vibe
Calendar
Bitrix24.Docs
Bitrix24.Drive
Bitrix24.Mail
Workgroups
CoPilot - AI in Bitrix24
Tasks and Projects
CRM
Contact Center
Sales Center
CRM Analytics (beta)
BI Builder
Sales Intelligence
Inventory Management
Marketing
Sites
Online Store (beta)
CRM + Online Store
CRM Store (beta)
e-Signature
e-Signature for HR
Company
Knowledge base (beta)
Automation
Workflows
Telephony
Market
Subscription
Settings
Enterprise
Desktop App
General questions
Bitrix24 On-Premise

Bitrix24Care

Upgrading to PHP 8.1x in Bitrix24 On-Premise

on-premise

You might have noticed such a warning in the Control panel of your Bitrix24 On-Premise:

As of 02/01/2023 only limited support will be provided for our products running on PHP versions below 8.1. You are currently using PHP 7.4.33. Please update your PHP installation or contact your hosting service provider for assistance.

What does it mean?

All PHP 7 versions are now end-of-life and no longer supported. There will be no bug or security fixes made to any of the PHP 7 versions. Thus, it is not recommended to use any PHP versions below 8.1.

You will not be able to install any platform updates to get new features, improve security and performance of your site until you upgrade your version of PHP to 8.1 in your virtual server environment.


What should I do?

You should schedule an update of your PHP version to 8.1 version as soon as possible.

The update is performed gradually. Contact your system administrator or the hosting service provider for assistance.

  1. Be sure to do a backup of your site. You can use the built-in backup creation tool, or create a server-level backup.

  2. Install all the available updates at Control panel > Marketplace > Platform Update.

  3. Install all the available updates for the third-party solutions from the Market at Control panel > Marketplace > Solution Update.

  4. Update your PHP version to 8.1 version

    If you use BitrixVM, you can update PHP manually via the virtual appliance menu item 1. Manage servers in the pool - 8. Update PHP and MySQL. Learn more about it in this course.
  5. Check again for available platform and solution updates.


What to do in case of errors when updating the PHP version

  • If there are errors in the operation of the standard Bitrix24 modules, contact Bitrix24 Support.

    Also, if the solutions from the Market contain bitrix.* in their names, contact Bitrix24 Support, for example:

     bitrix.eshop bitrix.sitecommunity bitrix.sitecorporate bitrix.siteinfoportal bitrix.sitepersonal bitrix.learningtemplates
  • If there are errors in the operation of the third-party modules installed from the Market, contact the module developer. You can find their contacts in the Support tab.


Common issues and how to solve them

Possible reasons behind the issues after upgrading to PHP 8.1x

  • You have not installed the available updates at Control panel > Marketplace > Platform Update before upgrading to PHP 8.1x.

  • You have not installed the available updates for the third-party solutions from the Market at Control panel > Marketplace > Solution Update before upgrading to PHP 8.1x.

  • The developer has not updated the module to support PHP 8.1 version.

How to resolve some common issues after upgrading to PHP 8.1x

  • Downgrade to the previous PHP version 7.x, get all the recommended updates, and then upgrade to PHP 8.1x again.

  • If installing updates does not help to fix the issues, follow the recommendations from this section - What to do in case of errors when updating the PHP version.

  • Temporarily disable the module that contains errors by moving it away from /bitrix/modules.

  • Remove a third-party solution that contains errors.

Note that these recommendations are provided to solve the issues in the operation of a specific module. Each error should be reviewed individually by the developer.

[Ux11] Error in the "#MODULE#" module description. Cannot connect the update server. [Ux11] Error in the "#MODULE#" module description.

This error may appear after upgrading your PHP version to 8.1. In this case, the site works correctly, but it is not possible to install or update any other solutions until the issue is solved.

Solution:

To fix the error, open the file /bitrix/modules/<module_name>/install/index.php and replace the code function <module.name>() with another code:

function __construct()

The script encountered an error and will be aborted. To view extended error messages, enable this feature in .settings.php

Solution:

Connect to FTP/SFTP or log in to the hosting control panel, and enable the error output in /bitrix/.settings.php:

'debug' => true,

After that, you will see the error message text on the site.

Example of the error message text
 Non-static method Super\Functions\CSuperModRep::checkBack() cannot be called statically (0) /home/bitrix/modules/super.mod/lib/functions/CSuperModRep.php:52 #0: Super\Functions\CSuperModRep::checkRepActive() /home/bitrix/modules/super.mod/classes/general/CModEvents.php:1621 #1: CModEvents::OnPageStartHandler() /home/bitrix/modules/main/classes/general/module.php:480 #2: ExecuteModuleEventEx(array) /home/bitrix/modules/main/include.php:163 #3: require_once(string) /home/bitrix/modules/main/include/prolog_before.php:14 #4: require_once(string) /home/bitrix/modules/main/include/prolog.php:10 #5: require_once(string) /home/bitrix/header.php:1 #6: require(string) /home/index.php:1 

In this example, the third-party method CSuperModRep::checkBack() of the super.mod. solution gives the error.

To fix the error, in the checkBack() code, you need to declare the static function.

Replace

function checkBack()

by

public static function checkBack()

PHP Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in /www/bitrix/modules/main/tools.php

This error may appear after upgrading to PHP 8.1x if you have not installed the available platform updates when using the PHP 7.x version.

Solution:

This issue has been fixed in the Main module updates main 22.100.0.

Downgrade to the previous PHP version 7.x, get all the recommended updates, and then upgrade to PHP 8.x again.

[TypeError] call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method COMP\BXE\EventHandlers::AdminContextMenuShow() cannot be called statically (0)...

This error may appear after upgrading to PHP 8.1x, but it is not obvious:

Example of the error message text
 [TypeError] call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method COMP\BXE\EventHandlers::AdminContextMenuShow() cannot be called statically (0) /var/www//bitrix/modules/main/classes/general/module.php:480 #0: ExecuteModuleEventEx /var/www/bitrix/modules/main/interface/admin_ui_list.php:1983 #1: CAdminUiContextMenu->Show /var/www/bitrix/modules/main/interface/admin_ui_list.php:1168 #2: CAdminUiList->ShowContext /var/www/bitrix/modules/main/interface/admin_ui_list.php:630 #3: CAdminUiList->DisplayFilter /var/www/bitrix/modules/iblock/admin/iblock_element_admin.php:5217 #4: include(string) /var/www/bitrix/admin/cat_product_admin.php:3 

The error message text does not show the module directory, but this method COMP\BXE\EventHandlers::AdminContextMenuShow() belongs to the third-party module.

Solution:

To fix the error, in the AdminContextMenuShow() code, you need to declare the static function correctly.

Replace

function AdminContextMenuShow()

by

public static function AdminContextMenuShow()

A blank white screen after upgrading to PHP 8.1x

This error may appear because of setting the short_open_tag = Off parameter in PHP settings.

Solution:

  • Set this value in the PHP configuration file: short_open_tag = On.

  • Check the web server logs for any possible errors and fix them.

  • Also, you can check the errors on the page with a blank white screen: right-click the page and select View Page Source, scroll down, and check if there are any errors.

Was this information helpful?
Integration specialist assistance
That's not what I'm looking for
Complicated and incomprehensible text
The information is outdated
It's too short. I need more information
I don't like the way this tool works
Go to Bitrix24
Don't have an account? Create for free