Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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