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.

PHP 5.04 without mysql/mysqli conflict?

Discussion in 'General Discussion' started by Pirotess, Apr 28, 2005.

  1. Pirotess

    Pirotess Member

    Joined:
    Apr 5, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Anyone know what the best way to install PHP 5.04 without breaking my system too badly or going to an edge configuration? Im running R78 atm and every time I try to configure apache to use 5.04 I get the following error:

    "configure: error: --with-mysql (using bundled libs) can not be used together with --with-mysqli."

    I understand why Im getting the error but I dont see where I can turn off the mysqli option so it wont try to compile. I know I can compile php by hand but I'd prefer to let cpanel do it to keep everything as clean as possible. The only threads I've found relating to PHP5 either dont pertain to this error or werent answered. Thanks in advance for any advice.
     
  2. Berbox

    Berbox Well-Known Member

    Joined:
    Apr 4, 2005
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Belgium
    I get the same error on my installation php5 with mysql 4.1.11. the comilation of php4.3.11 with mysql 4.1.11 works fine. I use Fedora Core3 and cpanel 10.2.0-C88

    Normally the problem has to be resolved following bugzilla link http://bugzilla.cpanel.net/show_bug.cgi?id=2242

    I checked the file /home/cpapachebuild/buildapache/modules/php_prep if the statements somewhere in the middle of the file corespond with the solution posted on bugzilla.
    There was now difference between them so there is still something wrong.

    Does anybody know what causes this problem???? Which option do I have to check and uncheck by Update Apache/easyapache.

    For now i found a solution to install php5 support with easyapache without mysqli.
    1. Open a schell and run /scripts/easyapache
    2. Open a new shell window when do you have to choose which option you want in easyapache
    3. Edit in the new window the file /home/cpapachebuild/buildapache/modules/php_prep
    Remove the following lines
    -MYSQLICHECK=`./checkmysqli`
    - if [ $MYSQLICHECK = "1" ]; then
    - if [ $NEWPHP = "1" ]; then
    - MYSQLI="--with-mysqli=/usr/bin/mysql_config"
    - if [ -e "/usr/local/bin/mysql_config" ]; then
    - MYSQLI="--with-mysqli=/usr/local/bin/mysql_config"
    - fi
    - fi
    - fi

    4. Choose option 6 in easyapache en choose your options.
    5. Let it run
     
  3. c4smok

    c4smok Member

    Joined:
    Jun 7, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    it seems differnt now...

    MYSQLICHECK=`./checkmysqli`
    MYSQLI=""
    if [ $MYSQLICHECK = "1" ]; then
    if [ "1" = "1" ]; then
    MYSQLI="--with-mysqli=/usr/bin/mysql_config"
    if [ -e "/usr/local/bin/mysql_config" ]; then
    MYSQLI="--with-mysqli=/usr/local/bin/mysql_config"
    fi
    fi
    fi
     
    #3 c4smok, Jun 23, 2005
    Last edited: Jun 23, 2005
  4. adept2003

    adept2003 Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    283
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    ~ "/(extra|special)/data"
    still not working though. with 5 servers, it's a pain having to ssh into each box trying to fix what WHM should be doing automatically.
     
  5. c4smok

    c4smok Member

    Joined:
    Jun 7, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I have tried this 10 times now...

    Nothing..

    Help!!

    I have tried every fix on this forum...

    no luck
     
    #5 c4smok, Jun 24, 2005
    Last edited: Jun 24, 2005
  6. c4smok

    c4smok Member

    Joined:
    Jun 7, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Resolved..

    Got this from Cpanel Staff

    Changing print "1" to print "0" in /home/cpapachebuild/buildapache/checkmysqli and then running the bs script from that directory should allow this to work for you.

    Code:
    #!/usr/bin/perl
    my $mv = `/usr/bin/mysql --version 2>/dev/null`;
    if ($mv eq "") {
            $mv = `/usr/local/bin/mysql --version 2>/dev/null`;
    };
    $mv =~ /[\s\t]+4\.(\d+)/;
    my $subver = $1;
    if ($subver eq "1" || $mv =~ /[\s\t]+5\.\d+\./) {
        print "0"; # this is what I changed and it still did not work...
        exit;
    } else {
        print "0";
        exit;
    }
    
    run ./buildapache to make sure your using 5.0
    then
    ./buildscript
     
  7. adept2003

    adept2003 Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    283
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    ~ "/(extra|special)/data"
    so is this a bug? if so, is there a bugzilla report and where can I find it? only reason is so that I can track it's status and update WHM when its status has changed to "resolved".
     
  8. foxboy

    foxboy Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    try using the mysqli option in combination with the "use system mysql" option instead of the mysql option.

    That should do the trick.
     
  9. adept2003

    adept2003 Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    283
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    ~ "/(extra|special)/data"
    what are the implications of using the system mysql? i can't remember why i'm not using it at the moment, but i know i had a good reason not to use it...
     
  10. cPanelBilly

    cPanelBilly Guest

    This is fixed in the latest version of buildapache.
     
  11. foxboy

    foxboy Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    It uses the libraries from the mysql-libs installed on your system, instead of the libraries that come bundled with php.
    So if php's bundles are only compatible with 4.x.x an you have mysql 4.1.x then you should use the system libs. I'm using this for a while now and have absolutely no problems with it.
     
  12. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    I still cannot compile php5 unless I do it with the --without-mysqli option. Is there something I'm missing?
     
  13. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Has anybody got php5 working with both mysql and mysqli? I have tried and tried but cannot get it to work. The only thing I haven't tried yet is symlinking the files to another directory...
     
Loading...

Share This Page