Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 13 of 13
  1. #1
    Member
    Join Date
    Apr 2005
    Posts
    11

    Default PHP 5.04 without mysql/mysqli conflict?

    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. #2
    Member
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    55

    Default

    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. #3
    Member
    Join Date
    Jun 2004
    Posts
    7

    Default

    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
    Last edited by c4smok; 06-23-2005 at 02:31 PM.

  4. #4
    Member adept2003's Avatar
    Join Date
    Aug 2003
    Location
    ~ "/(extra|special)/data"
    Posts
    283

    Default

    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. #5
    Member
    Join Date
    Jun 2004
    Posts
    7

    Default

    I have tried this 10 times now...

    Nothing..

    Help!!

    I have tried every fix on this forum...

    no luck
    Last edited by c4smok; 06-24-2005 at 11:23 AM.

  6. #6
    Member
    Join Date
    Jun 2004
    Posts
    7

    Default

    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. #7
    Member adept2003's Avatar
    Join Date
    Aug 2003
    Location
    ~ "/(extra|special)/data"
    Posts
    283

    Default

    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. #8
    Member
    Join Date
    Sep 2003
    Posts
    66

    Default

    try using the mysqli option in combination with the "use system mysql" option instead of the mysql option.

    That should do the trick.

  9. #9
    Member adept2003's Avatar
    Join Date
    Aug 2003
    Location
    ~ "/(extra|special)/data"
    Posts
    283

    Default

    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. #10
    cPanelBilly
    Guest

    Default

    This is fixed in the latest version of buildapache.

  11. #11
    Member
    Join Date
    Sep 2003
    Posts
    66

    Default

    Quote Originally Posted by adept2003
    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...
    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. #12
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    I still cannot compile php5 unless I do it with the --without-mysqli option. Is there something I'm missing?

  13. #13
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    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...

Similar Threads & Tags
Similar threads

  1. Problem with PHP library mysqli.so
    By ChrisRHS in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-05-2009, 02:07 PM
  2. MySQLi (mysql improved) ?
    By sh4ka in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-07-2009, 11:14 AM
  3. Upgrading to PHP 5.2.x - mysql/mysqli problems to look out for?
    By webignition in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-30-2007, 04:32 AM
  4. PHP 5.x.x: Can WHM Compile with mysql and mysqli APIs Automatically?
    By jfxberns in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-26-2006, 02:05 PM
  5. MySQL and MySQLi
    By Olate in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 01-09-2006, 04:07 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube