N
N
Nikolay Matyushkin2019-10-15 15:38:05
MySQL
Nikolay Matyushkin, 2019-10-15 15:38:05

Error when migrating a site to Bitrix (Call to undefined function mysqli_init()), how to get rid of it?

Hello. Moved site to Centos 7 VM.
Gentleman's set: apache, php, mysql.
I launched the restore.php file, deployed the backup, separately deployed the dump to the database. I go to the site, I get:

Call to undefined function mysqli_init() (0)
/var/www/html/roll-express.com/bitrix/modules/main/lib/db/mysqliconnection.php:48
#0: Bitrix\Main\DB\MysqliConnection->connectInternal()
  /var/www/html/roll-express.com/bitrix/modules/main/lib/db/mysqliconnection.php:122
#1: Bitrix\Main\DB\MysqliConnection->queryInternal(string, array, NULL)
  /var/www/html/roll-express.com/bitrix/modules/main/lib/db/connection.php:330
#2: Bitrix\Main\DB\Connection->query(string)
  /var/www/html/roll-express.com/bitrix/modules/main/lib/config/option.php:226
#3: Bitrix\Main\Config\Option::load(string, NULL)
  /var/www/html/roll-express.com/bitrix/modules/main/lib/config/option.php:53
#4: Bitrix\Main\Config\Option::get(string, string, string)
  /var/www/html/roll-express.com/bitrix/modules/main/lib/httprequest.php:392
#5: Bitrix\Main\HttpRequest->prepareCookie(array)
  /var/www/html/roll-express.com/bitrix/modules/main/lib/httprequest.php:69
#6: Bitrix\Main\HttpRequest->__construct(object, array, array, array, array)
  /var/www/html/roll-express.com/bitrix/modules/main/lib/httpapplication.php:46
#7: Bitrix\Main\HttpApplication->initializeContext(array)
  /var/www/html/roll-express.com/bitrix/modules/main/lib/application.php:122
#8: Bitrix\Main\Application->initializeExtendedKernel(array)
  /var/www/html/roll-express.com/bitrix/modules/main/include.php:23
#9: require_once(string)
  /var/www/html/roll-express.com/bitrix/modules/main/include/prolog_before.php:14
#10: require_once(string)
  /var/www/html/roll-express.com/bitrix/modules/main/include/prolog.php:10
#11: require_once(string)
  /var/www/html/roll-express.com/bitrix/header.php:1
#12: require(string)
  /var/www/html/roll-express.com/404.php:7
#13: include_once(string)
  /var/www/html/roll-express.com/bitrix/urlrewrite.php:4

Following what Google gave out, in the file /bitrix/php_interface/dbconn.php I added the constant define("BX_USE_MYSQLI", false), and in the file /bitrix/.settings.php I changed '\\Bitrix\\Main\\DB\ \MysqlConnection' to '\\Bitrix\\Main\\DB\\MysqliConnection'. The error still remains.
There were recommendations
1) to uncomment the line "extension=php_mysqli.dll" in php.ini, but I don't have it.
2) along the path "/etc/php.d/" create the file "30-mysqli.ini" and add the line "extension=mysqli.so" there. The error remains. I can't figure out why the error persists.
phpinfo() works well.
Tell me, in which direction can I dig more?)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
irishmann, 2019-10-15
@Devilz_1

Install mysqli extension

A
Adamos, 2019-10-15
@Adamos

PhpInfo, "working well", what does it indicate about the presence of the mysqli extension?
That is, turned off the use of MySqli and began to use it. Logically...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question