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.

Gzip export in phpmyadmin

Discussion in 'Database Discussions' started by web12, Jun 1, 2003.

  1. web12

    web12 Well-Known Member

    Joined:
    Nov 20, 2002
    Messages:
    240
    Likes Received:
    0
    Trophy Points:
    166
    Hi,

    Does anyone know the reason why the phpmyadmin shipped with Cpanel does not have the ability to "Gzip" or "zip" an exported database?

    I have a client asking this question that he used to be able to do this with a previous host, and how come this ability is not in ours.

    Checking up on the phpmyadmin site, on the demo they have online, the functionality is available to select a compression rate.

    Anybody know the answer to this?

    thanks

    cPanel.net Support Ticket Number:
     
  2. ehsan

    ehsan Well-Known Member

    Joined:
    Dec 11, 2001
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    316
    good question,
    I just noticed that
    phpmyadmin the version that comes with cpanel looks to see if these are enabled:

    in /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
    line 222 223 224
    all should be set to true
    like :
    // For the export features...
    $cfg['ZipDump'] = TRUE; // Allow the use of zip/gzip/bzip
    $cfg['GZipDump'] = TRUE; // compression for
    $cfg['BZipDump'] = TRUE; // dump files


    then where I am at right now is in db_details_export.php where
    @function_exists('gzcompress')
    or
    @function_exists('gzencode')
    or
    @function_exists('bzcompress')
    they don't return any thing!

    in this phpmyadmin these functions are used to be more os free as documentation says...
    these functions should be existing in php 4 and above! I don't know why it is not responding there,
    I might leave it like this for now, please let me know if any one found a solution...

    cPanel.net Support Ticket Number:
     
  3. web12

    web12 Well-Known Member

    Joined:
    Nov 20, 2002
    Messages:
    240
    Likes Received:
    0
    Trophy Points:
    166
    Hi ehsan,

    I checked on those variables, and they are all set to true... so I am not sure why those options to gzip things wouldnt appear in phpmyadmin.

    Anyone got any clues?

    cPanel.net Support Ticket Number:
     
  4. ehsan

    ehsan Well-Known Member

    Joined:
    Dec 11, 2001
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    316
    Because @function_exists('gzcompress') and others that I said above are not returning true!
    I don't know why!

    I didn't put more time on it, maybe this weekend,
    but if some one wants to track it, don't waste your time, try to see why @function_exists('gzcompress') does not return true in that script.... maybe a very simple solution is out there like installing a module or something...(Zlib is installed or at least that's what phpinfo shows)

    Thanks

    cPanel.net Support Ticket Number:
     
    #4 ehsan, Jun 6, 2003
    Last edited: Jun 6, 2003
  5. web12

    web12 Well-Known Member

    Joined:
    Nov 20, 2002
    Messages:
    240
    Likes Received:
    0
    Trophy Points:
    166
    I installed the standalone version of phpMyAdmin to see if it was something peculiar like a module not installed and everything worked perfect...as it should.

    All export functions were there and it ended up just confusing me even more... still wonder why those functions arent there in the cpanel version.

    weird.

    cPanel.net Support Ticket Number:
     
  6. mpierre

    mpierre Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    166
    The problem is that apparently, the special PHP version in Cpanel doesn't have Gzip compression...

    If you notice, even when PHP is down, WHM still works with PHP : There are 2 PHP versions installed on each server...

    The one with WHM/CPanel,
    the one for our sites...

    Does anyone know a method for adding GZip support to the WHM version of PHP ?

    I have to import over 160 GZipped databases from a server without a control panel that CPanel can import from...

    cPanel.net Support Ticket Number:
     
  7. masero

    masero Registered

    Joined:
    Aug 20, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    I have exactly the same problem. Please, perhaps the cPanel developer team can tell us how to fix this problem?

    I believe that this is a very important issue for many users !!

    Thanks.

    Alberto Masero

    cPanel.net Support Ticket Number:
     
  8. brumie

    brumie Active Member

    Joined:
    Dec 9, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    156
    same problem here, it's december 2003, looks like no solutions yet to make phpmyadmin exporting mysql dump with compression, it does usefull for real big database and I don't want to install another phpmyadmin so I try to make something like this mysql.sh
    Code:
    #!/bin/sh
    date=`date -I`
    mysqldump -u cpanelusername -pcpanelpass --opt --databases cpanelusername_database1 cpanelusername_database2 cpanelusername_database3 |
    bzip2 -c > /home/cpanelusername/backup/databasebackup-$date.sql.bz2
    
    when I need to export it i just run
    sh mysql.sh and save me times when downloading real big database
    remember not everyone running hi-speed internet

    what if user have no shell account?
    run it with cron job?
    I don't know maybe any better solution? anyone?

    Thanks
     
  9. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    343
    I am still trying to solve the problem .
    Anyone found a solution ?!
     
  10. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    343
    Infact Cpanel uses php 4.2.3 (!) instead of 4.3.4 . Probably (surely) this version doesn't allow gzip/zip compression .Darkorb please can you fix this problem ?
     
  11. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    343
    php included with cpanel was not compiled with zlib , that's the reason .

    What to do to fix the problem without breaking Cpanel ?
     
  12. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    343
    anyone please ?
     
  13. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Why not take the gz file and use the backup > restore an sql databse function.

    Vice versa to compress it.
     
Loading...

Share This Page