PHP, MySQL and “Unpredictable behaviour”

mwp8_lineup2This is what you get when you do a
Google image search for “unpredictable behaviour“.
Truly.

I finally decided to take some time to upgrade my Apache/PHP/SQL installation on ye ‘ol file server, and after installing the latest version of XAMPP (which I warmly recommend if you need a full suite for all your web hosting needs) I was greeted with the following message in phpMyAdmin:

Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.33. This may cause unpredictable behavior.

I figured something must be wrong, spent some time searching for people with the same error – there were plenty of them, but no answer in sight. Finally I was able to come across a few posts that made things clearer.

Apparently the MySQL client version that PHP uses today is  an older version –  of the file libmysql.dll to be precise. Some users have reported that they can simply use a newer build of libmysql.dll (Which can be acquired in the current MySQL build) while other people just show you how to remove the alert by editing the phpMyAdmin source code.

I tried replacing my copy of libmysql.dll with the latest build, but alas –  it just made my php executable lock up, so no luck there for now.

So… what exactly is the deal?
As far as I’ve read, people seem to agree that a small version mismatch poses no problems to the stability of your MySQL server. I am currently running the 5.0.51a client version and 5.1.33 MySQL version without any issues. (Knock on wood!) Although don’t risk it if you have a major version mismatch! (i.e. client is 4.0.1 and server is 5.0.0) because that could truly lead to unpredictable behavior. In these cases, make sure you update to the very latest PHP version available here.

Hope this post saves someone a little time!

Advertisements
Explore posts in the same categories: Computers, Development, Programming, Technical solutions

Tags: , , , , , , , , , , , , , , , , , ,

You can comment below, or link to this permanent URL from your own site.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s