E
E
Eugene2017-07-10 12:04:31
1C-Bitrix
Eugene, 2017-07-10 12:04:31

How to fix Cannot use 'String' as class name as it is reserved in error?

I am transferring Bitrix from a php 5.6 server to a php 7 server. I changed the lines in DBconf and .setting to work with msqli, but there was an error, the solution of which could not be found on the Internet.
when accessing
http://domain/bitrix/admin/index.php#authorize
, an error occurs
Fatal error: Cannot use 'String' as class name as it is reserved in /var/www/domain/bitrix/modules/main/ lib/text/string.php on line 4
Is there a solution? there is no support for Bitrix, is it possible to do without it? if so, how?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
servervas, 2019-10-24
@servervas

For everyone who has encountered this problem and cannot update Bitrix to the latest version:
1. Install the php5.6 version
2. Go to the settings: /bitrix/admin/settings.php?lang=ru&mid=main&tabControl_active_tab=edit5 and uncheck enhanced checking the correct installation of updates
3. Update Bitrix to the latest version
4. Install the version php7.1

A
Artyom Luchnikov, 2017-07-10
@lu4nik

It is necessary to update Bitrix, in new versions this problem is solved. If the update cannot be done, then leave php 5.6, let it spin on it.

F
FlexIDK, 2020-11-09
@FlexIDK

Rename the class to string7 for example) find where Text\String is used and replace with Text\String7
The rest seems to work on 7.2.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question