Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 5.5.31
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      CentOS 6.4

      Description

      Why does the compat RPM not include older versions of the library?

      Percona-Server-shared-compat-5.5.30-rel30.2.509.rhel6.x86_64.rpm http://repo.percona.com/centos/6/os/x86_64/Percona-Server-shared-compat-5.5.30-rel30.2.509.rhel6.x86_64.rpm contains

      libmysqlclient.so.12
      libmysqlclient.so.14
      libmysqlclient.so.15
      libmysqlclient.so.16
      libmysqlclient.so.18

      But MariaDB-5.5.31-centos6-i686-compat.rpm http://ftp.osuosl.org/pub/mariadb/mariadb-5.5.31/yum/centos6-x86/rpms/MariaDB-5.5.31-centos6-i686-compat.rpm only contains v15 and v16.

      Replacing the MariaDB rpm with the Percona one solves the PHP Headers problem.https://kb.askmonty.org/en/installation-issues-with-php5/

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            Client libraries version 12 and 14 are very old. MariaDB 5.1 (the earliest existing version) builds libmysqlclient.so.16.

            Do you really need libmysqlclient.so.12 or libmysqlclient.so.14? What version of MySQL do they come from?

            Yes, replacing MariaDB rpm with the Percona one solves the PHP Headers problem. As our KB page suggests "Ways to fix this issue: ... Use your original MySQL client library with the MariaDB". That's what you do when you use Percona rpm, it includes the client library that is very close (if not identical) to MySQL's one.

            Show
            serg Sergei Golubchik added a comment - Client libraries version 12 and 14 are very old. MariaDB 5.1 (the earliest existing version) builds libmysqlclient.so.16. Do you really need libmysqlclient.so.12 or libmysqlclient.so.14? What version of MySQL do they come from? Yes, replacing MariaDB rpm with the Percona one solves the PHP Headers problem. As our KB page suggests "Ways to fix this issue: ... Use your original MySQL client library with the MariaDB". That's what you do when you use Percona rpm, it includes the client library that is very close (if not identical) to MySQL's one.
            Hide
            slashterix Steven Barre added a comment -

            Well apparently I do need those very old ones to make PHP happy. It would be nice if it just worked out of the box and I didn't have to manually replace a package with another one. Makes for some interesting Chef recipes ...

            Show
            slashterix Steven Barre added a comment - Well apparently I do need those very old ones to make PHP happy. It would be nice if it just worked out of the box and I didn't have to manually replace a package with another one. Makes for some interesting Chef recipes ...
            Hide
            slashterix Steven Barre added a comment -

            Looking at http://mirror.rackspace.com/centos/6/os/x86_64/Packages/mysql-libs-5.1.66-2.el6_3.x86_64.rpm which I think is the package php-mysql is built against, I see it has only v16.

            If I remove the file /usr/lib64/libmysqlclient.so.16 then php won't run mysql at all.

            So I guess the problem is that the libmysqlclient.so.16 provided by MariaDB is different than the one from mysql-libs or Percona-Server-shared-compat

            Show
            slashterix Steven Barre added a comment - Looking at http://mirror.rackspace.com/centos/6/os/x86_64/Packages/mysql-libs-5.1.66-2.el6_3.x86_64.rpm which I think is the package php-mysql is built against, I see it has only v16. If I remove the file /usr/lib64/libmysqlclient.so.16 then php won't run mysql at all. So I guess the problem is that the libmysqlclient.so.16 provided by MariaDB is different than the one from mysql-libs or Percona-Server-shared-compat
            Hide
            slashterix Steven Barre added a comment -

            With libmysqlclient.so.16.0.0 from mysql-libs

            1. php -i | grep API | grep version
              Client API version => 5.1.66
              Client API library version => 5.1.66
              Client API header version => 5.1.67
              Client API version => 5.1.66
              Phar API version => 1.1.1

            With libmysqlclient.so.16.0.0 from Percona-Server-shared-compat

            1. php -i | grep API | grep version
              Client API version => 5.1.66
              Client API library version => 5.1.66
              Client API header version => 5.1.67
              Client API version => 5.1.66
              Phar API version => 1.1.1

            With libmysqlclient.so.16.0.0 from MariaDB-compat

            1. php -i | grep API | grep version
              Client API version => 5.3.12-MariaDB
              Client API library version => 5.3.12-MariaDB
              Client API header version => 5.1.67
              Client API version => 5.3.12-MariaDB
              Phar API version => 1.1.1

            So it seems the problem is actually that your version of that library is 5.3 while everyone else is 5.1. Why call the package "compat" if its not compatible?

            Show
            slashterix Steven Barre added a comment - With libmysqlclient.so.16.0.0 from mysql-libs php -i | grep API | grep version Client API version => 5.1.66 Client API library version => 5.1.66 Client API header version => 5.1.67 Client API version => 5.1.66 Phar API version => 1.1.1 With libmysqlclient.so.16.0.0 from Percona-Server-shared-compat php -i | grep API | grep version Client API version => 5.1.66 Client API library version => 5.1.66 Client API header version => 5.1.67 Client API version => 5.1.66 Phar API version => 1.1.1 With libmysqlclient.so.16.0.0 from MariaDB-compat php -i | grep API | grep version Client API version => 5.3.12-MariaDB Client API library version => 5.3.12-MariaDB Client API header version => 5.1.67 Client API version => 5.3.12-MariaDB Phar API version => 1.1.1 So it seems the problem is actually that your version of that library is 5.3 while everyone else is 5.1. Why call the package "compat" if its not compatible?
            Hide
            slashterix Steven Barre added a comment -

            Hmm. You said above that "MariaDB 5.1 (the earliest existing version) builds libmysqlclient.so.16" but it appears its coming from 5.3. Would it be possible to use the 5.1 version of the file instead in the RPM to make it more "compatible" with things like PHP?

            Or do I just need to find my own workaround to replacing that file with one from some other source.

            Show
            slashterix Steven Barre added a comment - Hmm. You said above that "MariaDB 5.1 (the earliest existing version) builds libmysqlclient.so.16" but it appears its coming from 5.3. Would it be possible to use the 5.1 version of the file instead in the RPM to make it more "compatible" with things like PHP? Or do I just need to find my own workaround to replacing that file with one from some other source.
            Hide
            serg Sergei Golubchik added a comment -

            It's called "compat" because it's fully compatible with 5.1 libraries. But PHP apparently insists not only on the library being compatible, but also coming from the same minor release version.

            If you'd like, you can install our 5.1 shared rpm, for example, this one:
            http://ftp.osuosl.org/pub/mariadb/mariadb-5.1.67/centos5-x86/rpms/MariaDB-shared-5.1.67-122.el5.i386.rpm

            Show
            serg Sergei Golubchik added a comment - It's called "compat" because it's fully compatible with 5.1 libraries. But PHP apparently insists not only on the library being compatible, but also coming from the same minor release version. If you'd like, you can install our 5.1 shared rpm, for example, this one: http://ftp.osuosl.org/pub/mariadb/mariadb-5.1.67/centos5-x86/rpms/MariaDB-shared-5.1.67-122.el5.i386.rpm
            Hide
            slashterix Steven Barre added a comment -

            Thanks @serg

            That works. Also of note for anyone else, you can install a CentOS 5 RPM on CentOS 6.

            It needs to be forced in, since it conflicts with MariaDB-compat, which you can't remove without everything freaking out.

            I've since opted to just manually install the one library file. Since I'm using chef I can just use the cookbook_file resource to install a working version.

            Show
            slashterix Steven Barre added a comment - Thanks @serg That works. Also of note for anyone else, you can install a CentOS 5 RPM on CentOS 6. It needs to be forced in, since it conflicts with MariaDB-compat, which you can't remove without everything freaking out. I've since opted to just manually install the one library file. Since I'm using chef I can just use the cookbook_file resource to install a working version.
            Hide
            slashterix Steven Barre added a comment -

            Looks like I can't close this myself ... so feel free to close.

            Show
            slashterix Steven Barre added a comment - Looks like I can't close this myself ... so feel free to close.
            Hide
            serg Sergei Golubchik added a comment -

            This is PHP/mysqli (when built without mysqlnd) issue — it ignores .so versioning and insists that the libmysqlclient.so should have the same minor version as what mysqli was built with.
            Otherwise it issues a warning. One can ignore the warning, use a different libmysqlclient.so or a different mysqli.

            Show
            serg Sergei Golubchik added a comment - This is PHP/mysqli (when built without mysqlnd) issue — it ignores .so versioning and insists that the libmysqlclient.so should have the same minor version as what mysqli was built with. Otherwise it issues a warning. One can ignore the warning, use a different libmysqlclient.so or a different mysqli.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                slashterix Steven Barre
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: