Old mysql-client question

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
outrage
Forum User
Forum User
Posts: 9
Joined: Thu Aug 30, 2007 1:33 pm

Old mysql-client question

Unread post by outrage »

After upgrading to PHP 5.2 and MySQL 5 a while ago I noticed that phpinfo still displays the Client API version as 4.1.22

Because everything worked fine regardless, it hasn't bothered me until a customer thought we were not running MySQL 5 after he ran phpinfo himself.

I've Googled for over an hour and the only solutions seem to be talking of recompiling which is beyond me to be honest.

Is there an easy way to update to the current mysql-client version or should I not bother?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

dont bother, it doesnt really mean anything for the client.
outrage
Forum User
Forum User
Posts: 9
Joined: Thu Aug 30, 2007 1:33 pm

Unread post by outrage »

OK I'll take your advice :)

Thanks for the quick reply Scott.
Highland
Forum Regular
Forum Regular
Posts: 674
Joined: Mon Apr 10, 2006 12:55 pm

Unread post by Highland »

This is only going to get worse due to phpMyAdmin 2.11 or later. When you go in you now get this message which causes people to freak out
Your PHP MySQL library version 4.1.22 differs from your MySQL server version 5.0.27. This may cause unpredictable behavior.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Changing that would break compatibility with Mysql 4. So it's not an option I'm afraid. Try rebuilding the rpm or better yet, change it with a hex editor.
Highland
Forum Regular
Forum Regular
Posts: 674
Joined: Mon Apr 10, 2006 12:55 pm

Unread post by Highland »

Not saying it's broken, just warning you that this particular change is going to increase the instances of this question being asked.

The only "solution" I know of is to go to CentOS 5 (or maybe FC7) which has the same client version as the server.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Oh believe me, I know this one pretty well. When I first started doing PHP/MySQL packages it was when we were going from 3 to 4, I was building against the latest mysql. Needless to say the shill cries of indignation were far louder when I did that. Now I just have to put up with the occasional "zomg It says mysql 4!" message (which is in the FAQ I might add) vs. an outage caused by someone --nodeps'ing around a mysql upgrade requirement.
perceptibility
New Forum User
New Forum User
Posts: 4
Joined: Mon Mar 07, 2005 11:18 pm
Location: San Francisco, CA

Unread post by perceptibility »

Hi scott,

I've just run into this problem using an application built with Zend Framework (1.5.1). The script throws a PHP warning:
Warning: mysqli_stmt::bind_result() [function.mysqli-stmt-bind-result]: Server returned unknown type 246. Probably your client library is incompatible with the server version you use!
which in itself is no big deal (warnings can be disabled). The real problem is that no data is being returned from the database after ~3 queries. I can copy/paste the exact same queries into phpMyAdmin and they work fine.

So, the question is, can I somehow update the PHP mysql(i) client API version to 5.0.x?

I am running:
CentOS 4.5
Plesk 8.2.0
PHP 5.2.3 (ART php-5.2.3-1)
MySQL 5.0.27 (ART mysql-5.0.27-1)

Thanks for your help, and for this invaluable resource.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Its very easy, you just need to rebuild the php package on that system. It will automatically link against the mysql 5 libraries you're using on the box.
perceptibility
New Forum User
New Forum User
Posts: 4
Joined: Mon Mar 07, 2005 11:18 pm
Location: San Francisco, CA

Unread post by perceptibility »

Thanks scott. I was able to rebuild from your source RPMS and update the php-mysql modules.

Cheers,
Rob
Post Reply