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.

bzip2 support in phpmyadmin

Discussion in 'Database Discussions' started by paulkoan, Jun 3, 2010.

  1. paulkoan

    paulkoan Well-Known Member

    Joined:
    Nov 24, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I have compiled bz2 support into php, and restarted cpanel. The only options for export in phpmyadmin are none, zipped and gzipped. On import it states that gzip will be automatically detected only.

    If I go to phpadmin/setup/index.php, there are errors saying that bzopen and bzcompress functions are not present, and so bzip isn't supported.

    My test script that checks for bzopen and bzcompress comes back positive.

    I have added $cfg['BZipDump'] = true to the config.inc.php for phpmyadmin.

    Is there anything I can do to get phpmyadmin to recognise bzip2?

    This is 11.25.0.

    Paul
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Must change the cPanel PHP config

    When you ran EasyApache with BZ2 support selected, you only rebuilt the PHP that is used to serve your sites. cPanel has its own internal PHP that is used for phpMyAdmin, phpPgAdmin, and all three Webmail systems. To use BZ2 in phpMyAdmin, you will need to rebuild the internal cPanel PHP.

    Edit /var/cpanel/easy/apache/profile/makecpphp.profile.yaml and change the following entries:

    Code:
    Cpanel::Easy::PHP4::Bz2: 0
    Code:
    Cpanel::Easy::PHP5::Bz2: 0
    Change each "0" to a "1." Save the changes to the file, and run the following command:

    Code:
    # /scripts/makecpphp
    The internal cPanel PHP will be rebuilt. This will not affect Apache or the PHP that runs your sites. Once this is finished, the bzip2 options should be available in phpMyAdmin.
     
  3. paulkoan

    paulkoan Well-Known Member

    Joined:
    Nov 24, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Thanks Jared,

    I did this on a couple of servers and both had the same result. Bzip didn't appear as an option in phpmyadmin, and when I checked the yaml file, the Bz2 option had been reset to 0.

    I am running it again as a sanity check, but what could cause this to happen in the event I have not lost my marbles?
     
  4. paulkoan

    paulkoan Well-Known Member

    Joined:
    Nov 24, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Here are some extracts from the build process:

    Code:
    Cpanel::Easy::PHP5::Bcmath: 0
    Cpanel::Easy::PHP5::Bz2: 1
    Cpanel::Easy::PHP5::CGI: 0
    
    Enabled in config, yet

    Code:
            -- Begin step 'configuring php for cPanel and cli' --
    !!
                    ./configure
                            --disable-pdo
                            --enable-ftp
                            --enable-libxml
                            --enable-mbstring
                            --enable-sockets
                            --enable-static
                            --enable-zip
                            --prefix=/var/cpanel/3rdparty/
                            --with-config-file-path=/usr/local/cpanel/3rdparty/etc/
                            --with-curl=/opt/curlssl/
                            --with-gd
                            --with-gettext
                            --with-imap=/opt/php_with_imap_client/
                            --with-imap-ssl=/usr
                            --with-jpeg-dir=/usr
                            --with-kerberos
                            --with-libdir=lib64
                            --with-libxml-dir=/opt/xml2/
                            --with-mcrypt=/opt/libmcrypt/
                            --with-mysql=/usr
                            --with-mysql-sock=/var/lib/mysql/mysql.sock
                            --with-openssl=/usr
                            --with-openssl-dir=/usr
                            --with-pcre-regex=/opt/pcre
                            --with-pgsql=/usr
                            --with-pic
                            --with-png-dir=/usr
                            --with-xpm-dir=/usr
                            --with-zlib
                            --with-zlib-dir=/usr
    
    Note --with-bzip not present

    Code:
    checking whether to enable bc style precision math functions... no
    checking for BZip2 support... no
    checking whether to enable calendar conversion support... no
    
    And so not built.

    This also comes up:

    Code:
    No package libz-devel available.
    
    Could this be related? Would seem odd that bzip support can be built in the main php without its present and yet not in the apache version.
     
  5. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I apologize for the delayed response. From the output you provided (which is helpful; thank you), it looks like you may not have a development package needed for BZ2 installed, which could cause it to be skipped and not included in the configure line. On one of my test systems, I have the following packages installed:

    Code:
    # rpm -qa|grep -i bzip
    bzip2-libs-1.0.3-4.el5_2
    bzip2-devel-1.0.3-4.el5_2
    bzip2-1.0.3-4.el5_2
    The bzip2-devel package would be the key, because many Apache and PHP extensions depend on source headers. If these packages are not installed on your server, you can try:

    Code:
    # yum install bzip2-devel
    Which should fetch and install the package and its dependencies. "yum list" returns no matches for "libz-devel", and it is not clear whether it is related to your BZ2 issue or not.

    If this does not help, we would need to log into the server in order to investigate fully. If you submit a ticket and PM me the ticket number, I would be happy to look at the server for you.
     
  6. paulkoan

    paulkoan Well-Known Member

    Joined:
    Nov 24, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    It looks like they are already installed:

    Code:
    Package bzip2-devel-1.0.3-4.el5_2.x86_64 already installed and latest version
    Package bzip2-devel-1.0.3-4.el5_2.i386 already installed and latest version
    
    Any other ideas?
     
  7. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Please submit a ticket

    Please submit a ticket so that we may log into the server and investigate the problem directly.
     
Loading...

Share This Page