MySQL version problems

RyderRyder Kalamazoo, Mi Icrontian
edited February 2007 in Science & Tech
Being around forums as much as I am, you would think I should put things in the right place...not sure where to put this one though.

I have a Debian 3.1 server running the following:

Apache 2.0.54
PHP 5.2.1
MySQL 5.0.32

But my phpinfo shows a MySQL client API of 4.1.5, how do I update that? How in the heck did it use anything older? Do I need to worry about it, things seem to be functioning normally, but testing phpinfo at another site (one of my hosts) they show a client API of 5.0.27 which matches up with MySQL version more closely.

I just got done removing (apt-get remove and dpkg --purge) everything I could find related to Apache2, Apache, php4, php5 and MySQL then re-installing everything.

It seems to have fixed the errors I was receiving, but that version number still bugs me.

You can see the phpinfo here: www.dragoncc.biz/test.php

Thanks

Comments

  • primesuspectprimesuspect Beepin n' Boopin Detroit, MI Icrontian
    edited February 2007
    try yum update php-mysql
  • Park_7677Park_7677 Missouri Member
    edited February 2007
    Are you using a pre-compiled version of PHP? That API version is most likely the version of the MySQL LIB used to compile the MySQL extension.

    So if you used PHP compiled by someone else they used an old(er) library or you have an old library on your system used to compile PHP yourself.

    I just finished compiling PHP 5.2.1 x64 and my MySQL API version is 5.0.19 (which is exactly the version of MySQL x64 I'm running and used to compile).
  • RyderRyder Kalamazoo, Mi Icrontian
    edited February 2007
    Prime,
    No Yum in Debian, its apt-get and php-mysql says it is at the latest version.

    Park_7677,
    Not quite that much of a Linux Guru yet, relying on getting packages based on what documentation I find online.

    I installed the libapache2-mod-php5 which is found through the source: deb http://dotdeb.pimpmylinux.org/ stable all

    So what you are saying is that the version of the mySQL extension compiled in PHP is the culprit? Nothing to do with the version of MySQL I have installed?
  • Park_7677Park_7677 Missouri Member
    edited February 2007
    RyderOCZ wrote:
    So what you are saying is that the version of the mySQL extension compiled in PHP is the culprit? Nothing to do with the version of MySQL I have installed?
    Correct. And truly if it works there's no harm in it running like that. I'm willing to bet a majority of PHP users use just whatever PHP offers and live happily.

    You can download the newest Libraries and headers from MySQL by visiting the download site (http://dev.mysql.com/downloads/mysql/5.2.html) and looking under the Linux header (Non-RPM or RPM).

    Choices
    1) Download the source and build MySQL yourself resulting in matching library and headers.
    2) Download the compiled Linux version that includes libraries and headers ready to use.
    3) Download RPM version of libraries and headers.

    On top of that you'll have to build PHP yourself. If you're not set up to compile both MySQL and PHP you're likely to miss out on features or have it not work at all.

    A lot of work and it sounds like it's not needed.
  • jaredjared College Station, TX Icrontian
    edited February 2007
    RyderOCZ wrote:
    Prime,
    No Yum in Debian, its apt-get and php-mysql says it is at the latest version.

    I haven't used Debian in a year or two so I am not exactly sure, but if it is anything like Ubuntu to get the latest and greatest version of software you often need to update your repositories.

    There might be an official repository update you can find that will have MySQL in it, otherwise just search around and I am sure someone will have setup their own repository with MySQL on it that you can apt-get.

    <3 repositories

    here is a little info about them, http://www.debian.org/doc/manuals/repository-howto/repository-howto

    good luck and cheers! :cheers3:
  • RyderRyder Kalamazoo, Mi Icrontian
    edited February 2007
    Ok....compiling isn't too hard...but I probably messed it up.

    Dselect makes it a lot easier to add and remove packages too, should be able to get that version problem sorted out.

    Thanks guys :)
Sign In or Register to comment.