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.

phpMyAdmin with MySQLi

Discussion in 'Database Discussions' started by Astral God, Nov 18, 2011.

  1. Astral God

    Astral God Well-Known Member

    Joined:
    Sep 27, 2010
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    Hello.

    I've edited the config.inc.php under

    HTML:
    /usr/local/cpanel/base/3rdparty/phpMyAdmin
    to use PMA with MySQLi extension (i have some CMS already using it, like Joomla).

    But, when i open PMA, i have the message:

    With this command, i see it:

    Code:
    # /usr/local/bin/php -m | grep -i mysql
    mysql
    mysqli
    
    I'm under CentOS 5.7, Apache 2.2, PHP 5.3.8, MySQL 5.1.56 and EasyApache with MYSQL Improved ON...
     
  2. nightman

    nightman Member

    Joined:
    Aug 3, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    what is your PHPINFO() file says?
     
  3. Astral God

    Astral God Well-Known Member

    Joined:
    Sep 27, 2010
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    Hi.

    Please, check here:

    /http://data.imagup.com/11/1136553672.png

    Everything seems OK.
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The PHP binary you've checked at /usr/local/bin/php is used for PHP sites rather than for cPanel provided applications such as PHPMyAdmin. You would need mysqli support to be enabled in /var/cpanel/3rdparty/bin/php for the PHP binaries there by initiating /scripts/makecpphp after editing the profile for cPanel's internal PHP.

    To accomplish this, you should be able to touch the file /var/cpanel/easy_skip_cpanelsync to ensure cPanel doesn't revise your profile changes, edit /var/cpanel/easy/apache/profile/makecpphp.profile.yaml file to include mysqli support, and then run /scripts/makecpphp to have it take effect. Basically these steps:

    Code:
    touch /var/cpanel/easy_skip_cpanelsync
    cp /var/cpanel/easy/apache/profile/makecpphp.profile.yaml /root/
    sed -i 's/Cpanel::Easy::PHP5::Mysqli: 0/Cpanel::Easy::PHP5::Mysqli: 1/g' /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
    /scripts/makecpphp
    This ensures you have a backup of the original makecpphp.profile.yaml in /root location prior to editing the file with sed to switch MySQLi to enabled (the 0 to 1 change).

    Then check it did compile:

    Code:
    /var/cpanel/3rdparty/bin/php -m | grep -i mysqli
    I followed the above steps on my machine, and it did compile in mysqli on it at that point:

    Code:
    root@host [/]# /var/cpanel/3rdparty/bin/php -m | grep -i mysqli
    mysqli
    You may want to remove the file /var/cpanel/easy_skip_cpanelsync at the end of the update per this discussion by Ken Power on a prior forum thread about how to update the internal PHP:

    http://forums.cpanel.net/f5/backend-php-version-221472.html#post946631
     
  5. Astral God

    Astral God Well-Known Member

    Joined:
    Sep 27, 2010
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    Thanks a lot Tristan, it worked like a charm :)
    Just one more question: it has compiled with PHP 5.2.9, but i'm using 5.3.8 in WHM.
    Is it normal ?

     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    cPanel's internal PHP is 5.2.9 rather than the PHP version used by websites.
     
  7. Astral God

    Astral God Well-Known Member

    Joined:
    Sep 27, 2010
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    Ok.

    Many thanks for your help :)
     
Loading...

Share This Page