Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3425 Compression compresses exported .sql twice

3.5.5
works-for-me
nobody
5
2013-06-11
2011-09-07
aommundsen
No

I am using phpmyadmin 3.4.4, php 5.3.8, mysql 5.1.58, apache 2.2.20 on CentOS 5.6 64bit - I am running phpMyAdmin over https

When exporting a database choosing "gzipped" the .gz file is compressed twice. just like the user is reporting here (see comment number 4 from dennis87:
http://sourceforge.net/projects/phpmyadmin/forums/forum/72909/topic/4428609

Can somone else confirm this bug is still present in phpyadmin 3.4.4?

Discussion

  • Marc Delisle
    Marc Delisle
    2011-09-11

    I cannot reproduce this.

    Maybe your web server is compressing once all its output with something like mod_deflate?

     
  • Marc Delisle
    Marc Delisle
    2011-09-11

    • status: open --> pending
     
  • aommundsen
    aommundsen
    2011-09-11

    Hi lem9. The problem happen on all my servers. I have two dedicated servers and one vps. Two of the servers is CentOS 5.6, and one server is CentOS 6.0. I have newest Apache 2.2.20 in all servers.

    Yes, I have mod_deflate enabled in all three servers. Do you think that is the problem?

    Also the servers is running DirectAdmin control panel, and phpMyAdmin 3.4.4 is installed by DirectAdmin custombuild function.

    I hope you will be able to reproduce this. I can't say for sure, but I do not think I experienced this with previous versions of phpMyAdmin. But I don't know wich version introduced the bug/problem.

     
  • aommundsen
    aommundsen
    2011-09-11

    • status: pending --> open
     
  • Marc Delisle
    Marc Delisle
    2011-09-12

    Try to deactivate mod_deflate on one server, temporarily.

     
  • aommundsen
    aommundsen
    2011-09-12

    Hi lem9. I am sorry but I can't do this now. I am in the middle of a server migration. I will not have time to test deactivating mod_defalte before after a month or so. Sorry.

     
  • Marc Delisle
    Marc Delisle
    2011-09-17

    • status: open --> pending
     
  • aommundsen
    aommundsen
    2012-12-20

    • status: pending --> open
     
  • aommundsen
    aommundsen
    2012-12-20

    Hi again. I see that this bug is also reported and marked as fixed in phpMyAdmin 3.5.5 here: https://sourceforge.net/tracker/index.php?func=detail&aid=3563824&group_id=23067&atid=377408

    However I just upgraded, and it is still not fixed. I am running Apache 2.4.3, and when I export choosing gzipped, the .gz file is still compressed twice. Please double check and make a new fix, because this one is not working.

     
  • Marc Delisle
    Marc Delisle
    2012-12-21

    Hello,
    the fix relies on the availability of the apache_get_modules() PHP function, maybe this is not available on your system?

     
  • Marc Delisle
    Marc Delisle
    2012-12-28

    • status: open --> pending
     
  • aommundsen
    aommundsen
    2013-01-04

    My Apache modules, see my comment reply

     
    Attachments
  • aommundsen
    aommundsen
    2013-01-04

    • status: pending --> open
     
  • aommundsen
    aommundsen
    2013-01-04

    Hi lem9. Sorry for my late reply. I might not have that module, but I am not sure what module name to look for. I have uploaded a attachment to this bug report wich show all my apache modules, please see the attachment named: my-apache-modules.txt

    I am running apache 2.4.3. And I think maybe this problem will be automatically solved when apache 2.4.4 is released. Please see the changelog in svn for the upcoming version of apache 2.4.4: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?revision=1409924

    Here is quote from the changelog:
    *) mod_ssl: Change default for SSLCompression to off, as compression
    causes security issues in most setups. (The so called "CRIME" attack).

    So now my hope/beleive is that when apache 2.4.4 is released and I upgrade, the problem will be fixed because SSLCompression in apache 2.4.4 is disabled.

    When apache 2.4.4 is released, I will test and see if the problem is solved. I will then update this bug ticket with a new reply. So lets just wait and see. Thanks!

     
  • Marc Delisle
    Marc Delisle
    2013-01-04

    Hi aommundsen,
    If you can do some PHP tracing and have access to your web server error log, it would help us.
    In phpMyAdmin 3.5.5, file export.php, after line 640 add this line:
    error_log(var_export(apache_get_modules(), true));

    and try a gzipped export, then post the line that was added to your error log.

     
  • aommundsen
    aommundsen
    2013-01-04

    Hi lem9. When I add that line to a new line after line number 640, and then try to do a export like you say, then the result is that it stop working and I get this error in my web browser when I start the export in phpmyadmin:

    "Remote server or file not found
    You tried to access the address https://dns.minhost.no/phpmyadmin/export.php, which is currently unavailable."

    However there was a new line in apache error log when I did that, here is the error from apache error log:

    [Fri Jan 04 14:11:46.921379 2013] [:error] [pid 7924] [client 87.252.70.111:55711] PHP Fatal error: Call to undefined function apache_get_modules() in /var/www/html/phpMyAdmin-3.5.5-all-languages/export.php on line 641, referer: https://xxx.xxx.com/phpmyadmin/db_export.php?db=asle_nr4&server=1&token=8441cbc4079e73fc7b93714e3d481897

    (Please note that I have removed the domain name from the error by replacing it with xxx.xxx.)

    Please let me know if you want me to do more testes. Thanks.

     
  • aommundsen
    aommundsen
    2013-01-04

    Hi again. I have tested some more. I have now tested doing a gzipped export without using https, but the result was the same as when using https, the exported file is compressed twice. First I get this exported file:

    asle_nr4.sql.gz

    Then I unpack the file and I get this folder: asle_nr4.sql

    Inside that folder I have this file: asle_nr4.sql

    That looks good, but when you try to open the file asle_nr4.sql in a text editor, you will see that there is only nonsense character wich is unreadable.

    Then you have to change the file name extension, you change the name of this file: asle_nr4.sql to become this name: asle_nr4.sql.gz

    Then you unpack asle_nr4.sql.gz again, then then you can open asle_nr4.sql in a text editor and it is readable and correct.

    If there was any misunderstanding about the details in my problem, I hope this explanation make it clear about the problem. Thanks!

     
  • aommundsen
    aommundsen
    2013-01-04

    Update: I am running php 5.4.10. I wanted to update about that, because when I first created the ticket a long time ago, I was running php 5.3.x, but not anymore. :)

     
  • Marc Delisle
    Marc Delisle
    2013-01-04

    We now have the confirmation that the apache_get_modules() PHP function is not available, see http://ca3.php.net/apache_get_modules.

    Either your server is not using the Apache 2 handler API, or your apache_get_modules() function is disabled in your PHP configuration. I don't know of any other way to detect the presence of mod_deflate.

     
  • Marc Delisle
    Marc Delisle
    2013-01-19

    • milestone: 3.4.4 --> 3.5.5
     
  • Marc Delisle
    Marc Delisle
    2013-02-10

    • status: open --> closed-works-for-me
     
  • Michal Čihař
    Michal Čihař
    2013-06-11

    • Status: closed-works-for-me --> works-for-me