Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-02-2018, 03:47 PM   #1
LQ Newbie
Registered: Jan 2018
Posts: 2

Rep: Reputation: Disabled
Mysqli not loading on Centos 7

I have a new Centos 7 instance = centos-release-7-4.1708.el7.centos.x86_64

I have instaledl apache and php 7.2 OK Below is what is reported back on a yum list
Installed Packages
php72-php-common.x86_64 7.2.0-1.el7.remi @remi-safe
php72-php-json.x86_64 7.2.0-1.el7.remi @remi-safe
php72-php-mysqlnd.x86_64 7.2.0-1.el7.remi @remi-safe
php72-php-pdo.x86_64 7.2.0-1.el7.remi @remi-safe
php72-php-pecl-mysql.x86_64 1.0.0-0.17.20160812git230a828.el7.remi @remi-safe
php72-runtime.x86_64 1.0-1.el7.remi @remi-safe

However I cannot get the MYSQLI extension to load. WHen I do a "php -v" I get this:
PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib64/php/modules/mysqli (/usr/lib64/php/modules/mysqli: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/ (/usr/lib64/php/modules/ cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.2.0 (cli) (built: Nov 28 2017 20:22:21) ( NTS )
Copyright (c) 1997-2017 The PHP Group

I cannot find out where the mysqlnd is installed and what is wrong with my php.ini file. Or am I missing something else? Where do I point the extension to? I need this to work for my Wordpress site.
Old 01-02-2018, 08:11 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Not official packages (not standard installation), see:

Perhaps set extension_dir to /opt/remi/php72/root/usr/lib64/php/modules in php.ini, but I'd uninstall these packages and install more official ones YMMV

upsss, sorry not familiar with centos, just follow this page instructions and you should be all set:

Last edited by keefaz; 01-02-2018 at 08:16 PM.
Old 01-03-2018, 09:11 AM   #3
LQ Newbie
Registered: Jan 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
Solved mysqli issue


Just adding the extension folders to php.ini for the extensions worked. mysqli and mysqlnd both loaded fine.

I will later uninstall and update to the more official versions.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysqli connect fails on debian, works on centOS pittendrigh Linux - Software 6 03-21-2017 08:52 AM
[SOLVED] Install mysqli Haniver Linux - Newbie 4 06-29-2016 06:02 PM
[SOLVED] CentOS 5.5 mysqli support junust Linux - General 3 03-16-2011 10:09 AM
Trying to install MySQLi puppymagic Linux - Newbie 1 08-19-2010 03:08 PM
Loading centOS stevens Linux - Newbie 2 06-26-2005 08:48 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration