PHPMyAdmin unable to upload gzip sql dump

Refers to:

  • Plesk 11.0 for Linux
  • Plesk 11.5 for Windows

Created:

2016-11-16 13:21:38 UTC

Modified:

2016-12-21 20:32:35 UTC

0

Was this article helpful?


Have more questions?

Submit a request

PHPMyAdmin unable to upload gzip sql dump

Symptoms

You have Debian or Ubuntu installation and you receive an error while you trying to upload gziped sql dump in PHPMyAdmin:

 You attempted to load file with unsupported compression (application/zip).
Either support for it is not implemented or disabled by your configuration

Resolution

  1. find /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/import.php
  2. Locate function\\_exists('gzopen') and replace 'gzopen' with 'gzopen64'. Resulting code should looks like this:
    case 'application/gzip':
    if ($cfg['GZipDump'] && @function_exists('gzopen64')) {
    $import_handle = @gzopen64($import_file, 'r');
    } else {

Cause

Debian 6 x64 uses zlib1g instead of zlib by default. zlib1g has different function naming: gzopen64 instead of gzopen , gzseek64 instead of gzseek etc. Since phpMyAdmin uses hard-coded check function_exists('gzopen') , it will fail in such conditions.

PHP bug - https://bugs.php.net/bug.php?id=53829

Have more questions? Submit a request
Please sign in to leave a comment.