Rick9004
Rick9004

Reputation: 43

On a Centos7 system with PHP72 installed cannot get mysqli extension loaded and working

mysqli.so is installed OK at /opt/remi/php72/root/usr/lib64/php/modules. Permissions are OK (the same as other extension that load properly.)

In my active php.ini conf file I added the command to load the extension (just below the [MYSQLI] : extension=/opt/remi/php72/root/usr/lib64/php/modules/mysqli.so

I restart apache and can see that the extension is not loaded. I use both the php info ( and my app that I'm trying to install TYPO3 which keeps noting the error on their install script.

centos-release-7-4.1708.el7.centos.x86_64 PHP 7.2.0 httpd-2.4.6-67.el7.centos.6.x86_64

Whats wrong?

Upvotes: 2

Views: 6409

Answers (2)

kiatng
kiatng

Reputation: 3057

I have similar situation, I can see the mysqli.so extension listed in /opt/remi/php71/root/usr/lib64/php/modules but it is not listed in the bash:

$ php -m

I used this to install mysqli extension and to restart the services:

$ sudo yum --enablerepo=remi-php72 install php-mysqli
$ sudo systemctl restart php-fpm nginx

and now I can see it listed in php -m.

Upvotes: 4

Remi Collet
Remi Collet

Reputation: 7051

With RPM, you never have to add any extension directive. Each extension provides its configuration file.

  • php-mysqlnd (base package) provides /etc/php.d/30-mysqli.ini and mysqli.so
  • php72-php-mysqlnd (SCL) provides /etc/opt/remi/php72/php.d/30-mysqli.ini and mysqli.so

Adding the extension directive may raise startup issue (missing extension mysqlnd which need to be loaded first, duplicate extension, ...)

BTW, I cannot reproduce, "php -m" properly reports about mysqli extension.

Following the Wizard instruction, should work out of the box.

Upvotes: 2

Related Questions