Bug #225 MySQL 4.012 - PHP, MyODBC, Perl May Not Work with release
Submitted: 3 Apr 2003 9:02 Modified: 31 May 2003 14:16
Reporter: gogman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S1 (Critical)
Version:4.0.12 OS:Linux (Redhat 8.0)
Assigned to: CPU Architecture:Any

[3 Apr 2003 9:02] gogman
Description:
Production version of MySQL 4.0.12 seem not to work with current production versions of PHP, MyODBC (and potentially Perl) due to libmysqlclient.so.10, which has been replace with libmysqlclient.so.12.

If confirmed, this means that MySQL 4.0.12 will not be able to be deloyed at a significant percentage of websites.

This problem has been reported to PHP.NET (see below). 

>     19 Mar 9:04am CST] gregory dot fennell at am dot sony dot com 
>     I upgraded one of our test systems today to the newest production
>     release of MySQL v4.0.12.  After upgrading apache will
> crash with an
>     error saying it can't find libmysqlclient.so.10.  I recompiled
>     apache
>     and came up with the same error.  I then recomplied php and during
>     the
>     "make" php errored out with the following:
>     
>     make: *** [libphp4.la] error 1
>     
>     I downgraded to MySQL 3.23.55-1 and recompled php and it
> worked fine.
>     
>     There seems to be an issue with compiling php-4.3.1 with
>     MySQL-4.0.12
>     (Production).
>     
>     If anyone can help with this that would be great since I
> want to use
>     some of the new features in MySQL 4.x.
>     
>     Versions:
>     PHP-4.3.1
>     COMPILE:
>     ./configure
>     --with-mysql=/usr --with-mysql-socket=/var/lib/mysql/mysql.sock
>     --with-gd
>     --enable-sockets
>     --with-apxs2=/www/bin/apxs
>     --with-config-file-path=/usr/local/lib/
>     --with-ldap
>     --with-openssl=/usr/local/ssl/
>     --with-zlib-dir=/usr/include/
>     --with-java=/usr/java/j2sdk1.4.1_01
>     --with-mcal
>     --with-ttf
>     --enable-gd-native-tt
>     --with-mnogosearch
>     
>     MySQL-4.0.12 (Production release)
>     COMPILE: RPM
>     
>     Kernel-2.4.18-27.8.0
>     COMPILE: RPM
>     
>     RedHat-8.0
>     [19 Mar 10:55am CST] sniper@php.net 
>     In PHP 5 there will be a new extension which gives the full
>     power Mysql 4 provides. There will not be any such support
>     in PHP 4.
>     
>     This snapshot has it:
>     http://snaps.php.net/php5-200303191630.tar.gz
>     
>     (use --with-mysqli and --without-mysql)
>     
>     [19 Mar 11:02am CST] sniper@php.net 
>     OTOH, it should be possible to use the mysql 4.0.12 too..
>     I'm checking this out.
>     
>     [19 Mar 11:07am CST] tal@php.net 
>     And the (new) mysqli extension requires MySQL 4.1 anyway...
>     
>     -Tal
>     [20 Mar 8:45am CST] gregory dot fennell at am dot sony dot com 
>     Since MySQL has made the 4.0.12 it production version,
> how far behind
>     is
>     PHP v5.x?  It kind of makes MySQL v4.x usless to PHP 
> websites until
>     PHP
>     has the capability to support MySQL v4.x, since alot of 
> sites use PHP
>     +
>     MySQL.  Any idea when PHP will have a version that will support
>     MySQL
>     v4.x?
>     
>     -Greg
>     [20 Mar 5:04pm CST] sniper@php.net 
>     Just tested this myself, if everything is installed correctly, PHP
>     4.3.x
>     compiles and works fine with Mysql 4.0.x.
>     
>     
>     [21 Mar 1:39pm CST] gregory dot fennell at am dot sony dot com 
>     I find this really hard to believe since this has
> happened on several
>     of
>     our test machines.  I am using the RPM distro of MySQL and simple
>     configs for PHP as you can see above.  So to call this 
> ticket "bogus"
>     I
>     think is premature, but your call.  Hope you don't see any more of
>     these
>     issues in the future!
>     
>     p.s.: I am not an amature in the Linux world and I know how to
>     configure
>     a system so the statement "if everything is installed correctly"
>     wasn't
>     really necessary.  I posted this to be a help, not to be
> belittled.
>     [21 Mar 2:16pm CST] paul at rydell dot com 
>     PHP 4.3.1 works for me with MySQL 4.0.12. I have the RPMs of MySQL
>     installed and I compiled PHP 4.3.1 from source. No problems.
>     
>     Maybe your --with-mysql path is wrong.
>     [21 Mar 2:25pm CST] gregory dot fennell at am dot sony dot com 
>     I am using the same confige statement for the 4.0.12
> installation as
>     I
>     am for the 3.23.55-1 in my php config.  I am at a loss 
> since I have
>     noticed this on 5 machines now all have different 
> hardware, the only
>     thing that is similar is the kernel, php, openssl, and mysql.
>     
>     When I install 4.0.12 (MySQL) i can't even use the natice mysql
>     support
>     built into php.  Any ideas to see what's up?
>     [28 Mar 3:18pm CST] jbernier at dalcom dot ca 
>     I have exactly the same problems. Is anybody found a solution. My
>     websites stop working after upgrading to MySQL 4.0.12.
> Please help.
>     [31 Mar 6:44am CST] gregory dot fennell at am dot sony dot com 
>     Since this has been confirmed by several of my colleges 
> and the post
>     from "jbernier at dalcom dot ca" as a real issue, I have re-opened
>     this
>     ticket.  Please see if there is a fix for this issue, or 
> if we need
>     to
>     change our config.  I have confirmed this with 5 of my colleges.
>     

How to repeat:

Suggested fix:
(1) Confirm the issue.
(2) If true, create developer swat team to assess impact. The scope of this issue may be larger that this message indicates.
(3) Identify list of highest risk complementary modules. PHP, MyODBC, Perl are a good start.
(4) Work with major 3rd party development groups to rev a release uses libmysqlclient.so.12.
[4 Apr 2003 0:26] Indrek Siitan
Thanks for the bug report. We're trying to reproduce the problem, but it would be really helpful, if you could check a few things:

 - locate the directory where libmysqlclient is in. There should be a symlink named libmysqlclient.so, which points to libmysqlclient.so.12. Does the symlink exist and point to .12, or does it still point to .10?

 - can you run "ldd" on your binary of PHP and see if it's linked against libmysqlclient.so or libmysqlclient.so.10 directly?
[4 Apr 2003 16:08] gogman
/usr/lib/libmysqlclient.so points to /usr/lib/libmysqlclient.so.12.0.0

lpp against rpm file does not see to get any results. [it may just be me] Here is the source: http://rpmfind.net/linux/RPM/redhat/updates/8.0/i386/php-mysql-4.2.2-8.0.7.i386.html
[4 Apr 2003 16:29] gogman
php-mysql-4.3.1-rbt.rh8.1.i386.rpm

source: http://www.aucs.org/rpmcenter/details/php-4.3.1-for-apache-1.3.x/php-mysql-4.3.1-rbt.rh8.1...

Requires
libmysqlclient.so.10  

Looks like it is direct. Not through libmysqlclient.so.
[7 Apr 2003 6:28] Indrek Siitan
In this case it's a problem with that RPM packaging, which is dynamically linking against a direct version of the libmysqlclient library.

I have however notified the package maintainer (Edwin Chan) of the problem.
[7 Apr 2003 11:20] gogman
Thank you with regards to your response to bug id 225, MySQL 4.012 - PHP, MyODBC, Perl May Not Work with release.

The use of the rpm example was to illustrate the issue with regards to the linking library. A simple search of rpms shows nearly all rpms for nearly all platforms currently are dependent on libmysqlclient.so.10 and not directed towards libmsyslqclient.so or libmysqlclient.so.12. This issues, as indicated in my initial bug report, has occurred for persons performing direct builds (the behavior is not consisent and may depend on how the party performs the linking operation). Where is seems not to occur is when someone uses the CVS to build the application (php not mysql). This is not a direct bug for mysql, but since nearly every depended piece of software (perl, php, myodbc) has the same error, mysql will be blocked from being deployed. This thus represents a very serious communication challenge for mysql, since it needs to communicate to all parties that the dependency needs to be updated.

thank you
[31 May 2003 14:16] Alexander Keremidarski
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Since 4.0.13 we provide RPM for backward compatibility

MySQL-shared-compat-4.0.13-0.i386.rpm

It consist of:

/usr/lib/libmysqlclient.so -> libmysqlclient.so.12.0.0
/usr/lib/libmysqlclient.so.10 -> libmysqlclient.so.10.0.0
/usr/lib/libmysqlclient.so.10.0.0
/usr/lib/libmysqlclient.so.12 -> libmysqlclient.so.12.0.0
/usr/lib/libmysqlclient.so.12.0.0
/usr/lib/libmysqlclient_r.so -> libmysqlclient_r.so.12.0.0
/usr/lib/libmysqlclient_r.so.10 -> libmysqlclient_r.so.10.0.0
/usr/lib/libmysqlclient_r.so.10.0.0
/usr/lib/libmysqlclient_r.so.12 -> libmysqlclient_r.so.12.0.0
/usr/lib/libmysqlclient_r.so.12.0.0