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.

how to enable mysqli

Discussion in 'General Discussion' started by A7med Baraka, Jan 1, 2010.

  1. A7med Baraka

    A7med Baraka Member

    Joined:
    Jan 1, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    i want to enable mysqli

    i searched for that and i found i have to run this
    Code:
    ./configure --with-mysql=/usr –with-mysqli=/usr/bin/mysql_config
    but its return that
    Code:
    -bash: ./configure: No such file or directory
    if this right where i have to write this command to run right
    Code:
    ./configure --with-mysql=/usr –with-mysqli=/usr/bin/mysql_config
    if no what i have to do to enable it ??

    kindly if anybody can help me show me the steps in details
    i hope anybody can help me in that

    thnx alot all
     
  2. ChrisRHS

    ChrisRHS Well-Known Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    You can enable this through easy apache, then go to the exhaustive options list.
     
    cPanelDon likes this.
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    ChrisRHS is correct; enabling the "mysqli" extension in PHP (v5) may be performed via EasyApache, using the Exhaustive Options List.

    For additional reference on using EasyApache I recommend the following documentation resources:
    Apache & cPanel/WHM
    The Options Lists
    EasyApache (Apache Update)
    Exhaustive Options List

    EastApache may be found in WHM at the following menu path:
    WHM: Main >> Software >> EasyApache (Apache Update)

    EasyApache may also be initiated using the following command via root SSH access:
    Code:
    # /scripts/easyapache
     
  4. A7med Baraka

    A7med Baraka Member

    Joined:
    Jan 1, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    thnx alot ChrisRHS

    thnx alot cPanelDon

    i do that and choose

    Mysql
    compile MySQL support using the PHP bundled libraries (if the System MySQL option is checked it takes precedence over this option)

    Mysql of the system
    compile mysql (and mysqli if its checked) support against the system libraries

    MySQL "Improved" extension.
    MySQLi does not replace the standard MySQL extension. Requires MySQL 4.1 or later. !! mysqli may not work on all systems, contact your support provider for mysqli support !!


    finished when check if this function exist or no it show me no ??
     
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    The following command may be used to list MySQL modules installed in PHP:
    Code:
    # /usr/local/bin/php -m | grep -i mysql
    As an example, you might see "mysql" and "mysqli"
    Code:
    # /usr/local/bin/php -m | grep -i mysql
    mysql
    mysqli
     
  6. A7med Baraka

    A7med Baraka Member

    Joined:
    Jan 1, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    yes it return
    mysql
    mysqli

    but when test it using
    PHP:
    <?php
    if (function_exists('mysqli')) {
        echo 
    "Yes.<br />\n";
    } else {
        echo 
    "No.<br />\n";
    }
    ?>
    it shown me NO ??!!
    any suggest ??
     
  7. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    The provided PHP script is not a valid test for MySQLi support; a minor edit to the script will help; change mysqli to mysqli_connect.

    Please refer to the official PHP documentation for more verbose details: PHP: The MySQLi Extension Function Summary - Manual
     
  8. A7med Baraka

    A7med Baraka Member

    Joined:
    Jan 1, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    also return NO ??
     
  9. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    When loading a PHP info page from the same path as the other script(s):
    1.) Does it show PHP version 4 or does it show PHP version 5?
    2.) Does it indicate support for MySQLi?
    Code:
    <?php
    phpinfo();
    ?>
    Reference: PHP: phpinfo - Manual


    Is MySQL at least version 4.1.13 or newer or 5.0.7 or newer? The following commands via SSH access could be used to confirm:
    Code:
    # mysql -V
    # mysqld -V
    # mysqladmin version | grep -i ver
    Reference: PHP: MySQLi Requirements - Manual
     
    #9 cPanelDon, Jan 6, 2010
    Last edited: Jan 6, 2010
Loading...

Share This Page