The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL API Wrong version

Discussion in 'General Discussion' started by kcdworks, Jul 17, 2003.

  1. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    We have been dealing with the problem of corrupted databases with Invision users. The problem is that the MySQL API that php is using is out of date.

    We opened a ticket, and this thread is to let everyone know what CPanel says about it.

    from ssh:
    mysqld Ver 4.0.12 for pc-linux on i686

    from phpinfo:
    Client API version 3.23.49

    cPanel.net Support Ticket Number: 18543
     
  2. carlgm

    carlgm Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    Try this:
    service httpd restart

    If your phpinfo page doesn't update then. Then /scripts/easyapache and recompile.

    cPanel.net Support Ticket Number:
     
  3. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    I've done all of that.

    Numerous times. None of it has corrected the API version, because Buildapache is using PHP's API instead of the one included with MySQL.

    cPanel.net Support Ticket Number:
     
  4. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,383
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You will need to recompile PHP manually. SSH into your box and you should have a PHP directory at:

    /home/cpapachebuild/buildapache/php-4.3.2

    or whatever version of PHP you are running. From your phpinfo page, copy and paste the configure line and remove any ''s. Then change the part that says:

    --with-mysql

    to

    --with-mysql=/usr

    after the configure script has been run, run:

    make

    and then finally:

    make install

    You may need to restart your apache for the changes to take affect.

    cPanel.net Support Ticket Number:
     
  5. thedavid

    thedavid Well-Known Member

    Joined:
    Nov 22, 2002
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Sparek is right...

    Recently we've tried to reinstall apache with the easyapache script and it did revert back down to the 3 series automagically (we have mysql4 on the server in question). Since then, all new compiles for php have been done by hand, as we can't have database corruption.

    -David

    cPanel.net Support Ticket Number:
     
  6. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    Well, that would make sense.

    Currently, the CPanel "tech" that I'm dealing with on my ticket is arguing that PHP being compiled with a lesser MySQL API version won't matter.

    cPanel.net Support Ticket Number:
     
  7. thedavid

    thedavid Well-Known Member

    Joined:
    Nov 22, 2002
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Well... Just our experience that the version 4 on the server and version 3 in the php compile cause issues, specifically with Invisionboard and Vbulletin most often. Once we upgraded these reports stopped coming in.

    -David

    cPanel.net Support Ticket Number:
     
  8. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    To a certain point, I would have to agree with using:

    PHP 4.3.1 '--with-mysql'
    Client API version 3.23.49

    does not cause that much of a problem for myself. Lots of php scripts are being use along with Vbulletin -- no Invisionboard's though. As with most setups, YMMV.


    Being a novice to a PHP manual install and trying to follow the steps outlined by sparek-3, I was able to locate the correct directory

    # ~/buildapache/php-4.3.1

    and was reading the INSTALL file -- a most interesting file it is. Having read the part on VERBOSE INSTALL and confirmed the correct DSOs are installed, want to make sure I do it right the first time.

    Do I understand correctly:

    use "--with-mysql=/usr" and not "--with-mysql-dir=/usr"?

    The INSTALL file for DSOs also differs a bit as it says to run:

    configure
    make install
    restart apache

    cPanel.net Support Ticket Number:
     
  9. goyo

    goyo Member

    Joined:
    Jun 17, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Same problem here!

    Something wrong with the web based apache update...
    I tried all the options...same results: Client API version 3.23.49

    cPanel.net Support Ticket Number:
     
  10. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    I have been told that (quoted from my ticket):

    To which, I of course responded that his answer was inadequate.

    It would be very nice to have an answer from Nick on this.

    cPanel.net Support Ticket Number:
     
  11. goyo

    goyo Member

    Joined:
    Jun 17, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Same with the current http://layer1.cpanel.net/buildapache.sea
    running from command line.

    Please somebody help us how to compile the current buildapache.sea with 4.x MYSQL Client API...my forums going crazy...

    cPanel.net Support Ticket Number:
     
  12. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    Re-compiling doesn't seem to be working for me. Going to try re-downloading and compiling manually.

    cPanel.net Support Ticket Number:
     
  13. tAzMaNiAc

    tAzMaNiAc Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sachse, TX
    I have MySQL 4 and if y'all say you have 3.23 API then I do too. Heck I ran EasyApache from WHM.. Yet I have all those invision, phpbb forums that run *just fine*. II have to agree with Website Rob here.

    Brenden

    cPanel.net Support Ticket Number:
     
    #13 tAzMaNiAc, Jul 17, 2003
    Last edited: Jul 17, 2003
  14. goyo

    goyo Member

    Joined:
    Jun 17, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    They running fine if you don't have mysql4 specific hacks such as mysql search hack which is in my case lowered the average server load with 40-50%. Also after used the WHM apache update my server load averages went up by 50% for no reason...

    I can't go back to php 4.3.1 because all my scripts use the newest GD2 features...

    Maybe I'll go back to this package which is worked fine for me...

    cPanel.net Support Ticket Number:
     
  15. jackal

    jackal Well-Known Member
    PartnerNOC

    Joined:
    Feb 23, 2002
    Messages:
    708
    Likes Received:
    0
    Trophy Points:
    16
    #15 jackal, Jul 17, 2003
    Last edited: Jul 17, 2003
  16. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    Strangely, re-compiling php on it's own manually resulted in the exact same version of the API being reported by phpinfo().

    cPanel.net Support Ticket Number:
     
  17. goyo

    goyo Member

    Joined:
    Jun 17, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
  18. sky

    sky Well-Known Member

    Joined:
    Nov 24, 2002
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    0
    hmm i thought this issue was discussed before.

    Ok for those who need to see the external api part this is what you should do(quick and dirty method):

    1) if you have nothing in /home/cpapachebuild/buildapache then i suggest you run /scripts/easyapache first. Once you reach to the point where you choose what kinda installation, choose one (so far only 1 works for me). Let it compile till the end and apache restarts.

    2) Now, run /scripts/easyapache again. Once you choose what kinda compilation hit CTRL-C when it starts running on the screen. The idea is to not run the script once you have made your choice.

    2) got to /home/cpapachebuild/buildapache and you will see a script called buildscript

    3) edit that script using whatever editor you like and find these lines :

    export WITHMYSQL="--with-mysql="
    if [ -e "/usr/local/bin/mysql" ]; then
    export WITHMYSQL="--with-mysql=/usr/local"
    fi
    if [ -e "/usr/bin/mysql" ]; then
    export WITHMYSQL="--with-mysql=/usr"
    fi
    if [ "`grep \"Red Hat Linux release 9\" /etc/redhat-release`" = "" ]; then
    export WITHMYSQL="--with-mysql"
    fi

    4) Remove those and replace with these:

    export WITHMYSQL="--with-mysql=/usr"
    if [ -e "/usr/local/bin/mysql" ]; then
    export WITHMYSQL="--with-mysql=/usr/local"
    fi
    if [ -e "/usr/bin/mysql" ]; then
    export WITHMYSQL="--with-mysql=/usr"
    fi
    if [ "`grep \"Red Hat Linux release 9\" /etc/redhat-release`" = "" ]; then
    export WITHMYSQL="--with-mysql"
    fi
    export WITHMYSQL="--with-mysql=/usr"

    5) The just run buildscript

    You should have it use your external libraries. Actuall for part 4, you only need the last line to be exporting the correct path.

    It should work as it works for me.

    cPanel.net Support Ticket Number:
     
  19. sky

    sky Well-Known Member

    Joined:
    Nov 24, 2002
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    0
    btw,

    from my experience, using the lower version library will cause table corruption issues with mysql 4. I am not sure if mysql have kinda solved this issue but it ain't nice losing tables :)

    cPanel.net Support Ticket Number:
     
  20. goyo

    goyo Member

    Joined:
    Jun 17, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank You!

    Hehh...it seems easier compile from source :D

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page