Menu

#3840 (ok 4.1.4) When exporting to gzip format, the data is compressed 2 times

4.1.3
fixed
export (16)
1
2014-01-07
2013-02-27
Gemorroj
No

When exporting to gzip format, the data is compressed 2 times.
As I see it is because of option "onfly_compression".

Discussion

1 2 > >> (Page 1 of 2)
  • Gurutharshan

    Gurutharshan - 2013-02-27

    I couldn't extract that .sql.gz file with gunzip... help me on how to extract..?

     
  • Gemorroj

    Gemorroj - 2013-02-27

    I use 7-zip on Windows..
    Try using http://sourceforge.net/projects/p7zip/

     
  • Gurutharshan

    Gurutharshan - 2013-03-02

    I was bugging into the code but couldnt find... But I tried to import the file again into seperate db, it was correctly inserted.. :^)

     
    • Gemorroj

      Gemorroj - 2013-03-02

      See this screenshot. I think it will help.

       

      Last edit: Gemorroj 2013-03-02
  • Marc Delisle

    Marc Delisle - 2013-03-02

    The reason for the double compression is that your web server itself has a module to gzip what it sends, and phpMyAdmin is not able to detect it.

    Is the web server using mod_deflate?

     
    • Gurutharshan

      Gurutharshan - 2013-03-02

      I think it's enabled.. mod_deflate shows under loaded modules under apache2handler in phpinfo

       
  • Marc Delisle

    Marc Delisle - 2013-03-03
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2013-03-03

    Gemorroj,
    I believe you found the cause of the bug, however I have difficulty reproducing it. Could you try this commit from my bug_3840 branch ?

    https://github.com/lem9/phpmyadmin/commit/b26895ed59c9a4b1742cf76e1e49d83e4db80d5f

     
    • Gemorroj

      Gemorroj - 2013-03-03

      Yes, of course, as soon as I get to a working computer. (Weekend.. =))

       
    • Gemorroj

      Gemorroj - 2013-03-04

      It did not work.
      I spent more thorough investigation of the problem. If I remove the browser header Accept-Encoding, then the problem can not be played.
      But, in the settings Apache, I not found that can automatically compress the data based on the header Accept-Encoding (mod_deflate module is disabled).
      In the setting of php, zlib compression in the same off.
      My initial assumption is that the problem is due to the option onfly_compression, probably wrong.

      In an attachment - phpinfo and httpd.conf

       

      Last edit: Gemorroj 2013-03-04
  • Marc Delisle

    Marc Delisle - 2013-03-04
    • assigned_to: Marc Delisle --> nobody
     
  • Marc Delisle

    Marc Delisle - 2013-03-04

    Thanks for the investigation; sorry I have no further ideas. I have pushed my patch (without the ChangeLog part) to master because I believe it's needed, but not necessarily to solve this bug.

     
  • Gemorroj

    Gemorroj - 2013-03-05

    I added this code to function PMA_gzencodeNeeded:

    <?php
    while (ob_get_level()) {
        file_put_contents('/log.log', print_r(ob_get_status(), true), FILE_APPEND);
        ob_end_clean();
    }
    

    Output:

    Array
    (
        [name] => default output handler
        [type] => 0
        [flags] => 112
        [level] => 1
        [chunk_size] => 0
        [buffer_size] => 16384
        [buffer_used] => 0
    )
    Array
    (
        [name] => ob_gzhandler
        [type] => 0
        [flags] => 112
        [level] => 0
        [chunk_size] => 0
        [buffer_size] => 16384
        [buffer_used] => 0
    )
    

    The problem disappeared.


    Perhaps this is not the correct code, but I think it is clear that the problem is due to handler ob_gzhandler. You may need to check for it, too.

     

    Last edit: Gemorroj 2013-03-05
  • Marc Delisle

    Marc Delisle - 2013-03-18
    • summary: When exporting to gzip format, the data is compressed 2 times --> (ok 4.0.0-beta3) When exporting to gzip format, the data is compressed 2 times
    • status: open --> open-fixed
    • assigned_to: Marc Delisle
    • priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2013-03-18
     
  • Marc Delisle

    Marc Delisle - 2013-03-27
    • Status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
  • aommundsen

    aommundsen - 2013-12-31

    This same problem is happening again on my servers. I am running phpMyAdmin 4.1.2, when I export as gzipped the data is compressed two times, so I will not be able to import it unles I first unpack the .gz file and then rename the unpacked file to .gz and unpack it one more time. Please confirm.

    (I am running Apache 2.4.7, PHP 5.57 (mod_php).)

     
  • Marc Delisle

    Marc Delisle - 2013-12-31

    What about version 4.1.3?

     
  • aommundsen

    aommundsen - 2013-12-31

    Where can I download it? Because 4.1.2 seem to be the newest. Can you instead provide a patch patch from the change in 4.1.3 wich I can test in 4.1.2?

     
  • aommundsen

    aommundsen - 2013-12-31

    Yes, previous it has been working correctly. However I do not know at what time/version the problem returned. Only yesterday one of my customers complained, so I noticed it again. I will test the new version and give feedback, however I don't see anything in the changelog that indicate that this would be fixed.

     
  • Marc Delisle

    Marc Delisle - 2013-12-31

    Is your server running Apache + mod_deflate?

     
  • Marc Delisle

    Marc Delisle - 2013-12-31
     
1 2 > >> (Page 1 of 2)