3

I am trying to import a database using phpMyAdmin. The file is compressed in a .zip.

Every time I try the import I get this error:

Error in ZIP archive: Compressed size is not equal with the value in header information.

I've tried exporting the file again and and used different applications to compress it but I always get the same error.

How can I fix this?

a1anm
  • 1,617
  • 11
  • 45
  • 78

3 Answers3

1

i dont know whats the reason for it, but you can fix this by rename the file to .gz e.g. database.sql.zip to database.sql.gz or if your program supports it, you can compress it to a .gz file in the first hand - this will also fix the problem

stif
  • 11
  • 1
  • Well just renaming the .sql.zip to .sql.gz doesn't work for me. I used PHPMyAdmin to dump a database to a compressed .sql.zip and tried reimporting it through (an other) PHPMyAdmin v4.6.3 using .sql.zip and also renaming it to .sql.gz as suggested above but both fail. – Jan Dec 13 '16 at 12:25
  • I have the answer: Use 7-ZIP to create a gzip compressed file of the .sql file and be sure to have the filename end in .sql.gz and then it works. – Jan Dec 13 '16 at 12:33
1

I had this same problem with a host provider (StartLogic).

I downloaded Guitar from MacUpdate and used the app to compress my .sql file into gzip format. Didn't have any problems importing my database after that.

cdeszaq
  • 30,869
  • 25
  • 117
  • 173
0

AFAIK, this error is caused due to a corruption of the ZIP during upload.

You can try and extract the zip and upload the actual sql.

Tomer
  • 17,787
  • 15
  • 78
  • 137