Forums / General Questions / mysqli_connect(): Headers and client library minor version mismatch.

mysqli_connect(): Headers and client library minor version mismatch.

Views: 9,861

Results 1 to 4 of 4
14 Feb 2017, 10:18 PM
#1
aurum_genesis avatar

aurum_genesis

New Zenner

Join Date:
Feb 2017
Posts:
12
Plugin Contributions:
0

mysqli_connect(): Headers and client library minor version mismatch.

I've got this error:

[14-Feb-2017 21:01:21 UTC] Request URI: /, IP address: MY IP
#1 mysqli_connect() called at [/home/soft/public_html/site.com/includes/classes/db/mysql/query_factory.php:64]
#2 queryFactory->connect() called at [/home/soft/public_html/site.com/includes/init_includes/init_database.php:23]
#3 require(/home/soft/public_html/site.com/includes/init_includes/init_database.php) called at [/home/soft/public_html/site.com/includes/autoload_func.php:48]
#4 require(/home/soft/public_html/site.com/includes/autoload_func.php) called at [/home/soft/public_html/site.com/includes/application_top.php:170]
#5 require(/home/soft/public_html/site.com/includes/application_top.php) called at [/home/soft/public_html/site.com/index.php:26]

[14-Feb-2017 21:01:21 UTC] PHP Warning: mysqli_connect(): Headers and client library minor version mismatch. Headers:50554 Library:100121 in /home/soft/public_html/site.com/includes/classes/db/mysql/query_factory.php on line 64

I am using zen cart 1.5, php 5.6 and maria db 10.1 with ngxinx. I'm keeping an old version as I need to use a certain plugin for a while.
I don't see any issue in website functionality from this error just that it fills the logs folder.

Can you please tell me how to fix it?

Thank you.

14 Feb 2017, 10:59 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: mysqli_connect(): Headers and client library minor version mismatch.

This has nothing to do with Zen Cart. It is a misconfiguration of your webserver.

After googling your error message it seems the most common cause of it is having mismatched extension versions compiled into PHP.
When compiling PHP you can tell it to compile the MySQL extension (called mysqli nowadays). But if you've installed one version of PHP but a different version of the PHP-MySQL extension, then you're going to get the header-and-client-library-mismatch error.

Get your server administrator to remove all the php extensions, remove php, and then reinstall/recompile php with the desired correct extensions, so that everything matches.

This is not a Zen Cart bug. Moving this post out of the Bug Reports section.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Feb 2017, 9:19 AM
#3
aurum_genesis avatar

aurum_genesis

New Zenner

Join Date:
Feb 2017
Posts:
12
Plugin Contributions:
0

Re: mysqli_connect(): Headers and client library minor version mismatch.

DrByte I appreciate your answer. I don't have a chance to fix the mismatch since webuzo won't update any time soon.
I was wondering if there is any way to disable error logging or limit it? I don't want to spend time daily deleting the logs.
Thank you.

15 Feb 2017, 3:12 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: mysqli_connect(): Headers and client library minor version mismatch.

You can control what gets logged in the /includes/extra_configures/enable_error_logging.php file.
On line 64 it sets what errors to log, based on PHP version.
You could simplify it to:

$errors_to_log = E_ALL & ~E_NOTICE & ~E_WARNING;

Basically you're just telling it to ignore warnings as far as logging goes.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.