3

I randomly started getting this error when trying to instantiate a new mysqli instance in php script:

mysqli::mysqli(): Headers and client library minor version mismatch. Headers:50541 Library:50626

I'm a little bit confused because when I run sudo yum list installed, the versions look to be the same. Either way, running sudo yum update does nothing to actually update the packages.

Here is the output for sudo yum list installed(just php packages):

php.x86_64                  5.4.16-36.el7_1                          @updates
php-cli.x86_64              5.4.16-36.el7_1                          @updates
php-common.x86_64           5.4.16-36.el7_1                          @updates
php-devel.x86_64            5.4.16-36.el7_1                          @updates
php-mbstring.x86_64         5.4.16-36.el7_1                          @updates
php-mcrypt.x86_64           5.4.16-3.el7                             @epel
php-mssql.x86_64            5.4.16-3.el7                             @epel
php-mysql.x86_64            5.4.16-36.el7_1                          @updates
php-pdo.x86_64              5.4.16-36.el7_1                          @updates
php-soap.x86_64             5.4.16-36.el7_1                          @updates

I am using CentOS Linux release 7.1.1503 (Core), PHP 5.4.16 and 5.6.26 MySQL Community Server.

I saw on other answers to this question that you can install the php-mysqlnd driver, but that driver isn't listed under yum's packages.

Here are the php packages I can install through yum:

php.x86_64                                 5.4.16-36.el7_1             @updates 
php-cli.x86_64                             5.4.16-36.el7_1             @updates 
php-common.x86_64                          5.4.16-36.el7_1             @updates 
php-devel.x86_64                           5.4.16-36.el7_1             @updates 
php-mbstring.x86_64                        5.4.16-36.el7_1             @updates 
php-mcrypt.x86_64                          5.4.16-3.el7                @epel    
php-mssql.x86_64                           5.4.16-3.el7                @epel    
php-mysql.x86_64                           5.4.16-36.el7_1             @updates 
php-pdo.x86_64                             5.4.16-36.el7_1             @updates 
php-soap.x86_64                            5.4.16-36.el7_1             @updates 

Anybody know how I can resolve this issue? I don't know why this would randomly crop up like this. The scripts were working before I left for the weekend on Friday and, so far as I know, nothing has changed.

| improve this question | | | | |
3

I was able to solve using sudo yum install php-mysqlnd. I must have mistyped it when trying to install the first time. Doh!

After installing php-mysqlnd run sudo service httpd restart.

Apparently a coworker messed with our mysql drivers. Asked if he changed anything that had to do with php or mysql and he told me he didn't. Looked at .bash_history and saw that he reinstalled php and a bunch of mysql drivers.

Lesson learned!

| improve this answer | | | | |
  • Had to do yum remove php-mysql before this solution because the two packages conflicted. – Nikola Novak Feb 17 at 9:58
0

you can solve this mistake by going to php Extensions and disable mysqli then enable nd_mysqli . Good luck

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.