Jump to content


Photo

US 5.1 - gz compression error in phpMyAdmin import


  • Please log in to reply
8 replies to this topic

#1 PatriciaRits

PatriciaRits

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows XP

Posted 06 October 2009 - 08:52 AM

Hi,

I have a problem with database exports that are gz compressed since upgrading to Uniform Server 5.1. They cannot be imported into the same or a different database. The uncompressed or zipped exports both work fine.

The error message contains loads of gibberish - I tried posting it, but that didn't work...

Patricia

#2 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 06 October 2009 - 03:28 PM

Hi Patricia,
I would like to reproduce this, what version of US did you use to create the gz’s on?

It looks like you do not have a real issue in terms of lost data “The uncompressed or zipped exports both work fine.” None the less still a pain and may be an issue for the next version of US.

All the best
Ric :)

#3 PatriciaRits

PatriciaRits

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows XP

Posted 11 October 2009 - 07:49 AM

Hi Ric,

I used US Nano 5.1 to create the gz's - using the phpMyAdmin link. During the export it all seems to be going well. It's only upon importing the file that the errors occur.

I have US installed on Windows XP SP3. My default browser is FireFox 3.5.3.
I also use Zone Alarm and AVG, but I don't think these interfere with US.

I only upgraded about a week ago. Before I have been using Apollo 3.5 and never had a problem with that version.

Like you said, no data loss. Just a bit of a nuisance if you're used to gz exports...

Thanks!
Patricia

Forgot to mention that I have no issues importing gz's that I created earlier with US Apollo 3.5!

#4 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 11 October 2009 - 09:54 AM

Strange I could not reproduce your results.
I have tested on both US 5.1 and 5.3 (recommended includes bug fixes)
I exported and imported a Wordpress database.
These are the settings I used:

Export:
Selecte All
SQL - Radio button selected

Options:
Comments - Checked
All others - unchecked

Structure:
Structure - Checked
Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT - Checked
Add IF NOT EXISTS - Checked
Enclose table and field names with backquotes - Checked
All others - unchecked

Add into comments:
All - unchecked

Data:
Data - Checked
Use hexadecimal for BLOB - Checked
Export type - Insert

Save as file:
Save as file - Checked
Save on server in - Checked
"gzipped" - Radio button selected

After running the above deleted wordpress database, created new database wordpress and imported the above gz file.

Just wondering if you will have the same issues with 5.3

All the best
Ric :)

#5 PatriciaRits

PatriciaRits

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows XP

Posted 11 October 2009 - 10:28 AM

Hi Ric,

When I use the exact same settings as you did, it works. I think it has to do with the save location - I normally don't save on server but elsewhere and then I get the error.

I also got the error when I try to import a gz on a live server. So I tested this with importing from the 2 different locations and it works when the file was saved in on server in C:/UniServer/etc/phpmyadmin/ directory, but not when saved outside the US folder structure.

When saving outside, I get an error which looks like this:
http://www.patriciar...mport-error.jpg

Hope this helps making more sense of this error...

Patricia

#6 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 11 October 2009 - 06:11 PM

Hi Patricia,

I have spent some time looking at this and now understand the cause!
It’s a double compression issue; the gz gets recompressed to another gz. :)

Hence the file you saved externally if you uncompress this using say 7z and rename that with an extension .gz and import it will work. B)

To me what’s import the data is recoverable, however there is a serious issues because that should not have occurred. :)

Well I am looking for a solution, currently not sure where or what breaks it. B)

All the best
Ric :)

#7 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 01 November 2009 - 09:17 AM

Hi Patricia,
Well phpMyAdmin have just released version 3.2.3 I had hoped this would fix the double compression issue. Alas no and no reported bugs on their tracking system for this issue in years.

I decided to take another look, after reading the Apache manual over and over discovered it was a configuration issue.

Solution edit Apache’s configuration file:
UniServer\usr\local\apache2\conf\httpd.conf

Delete everything between these two lines:
# DEFLATE Module Settings
# DEFLATE Module Settings End

Replace with new section:

# DEFLATE Module Settings
<IfModule mod_deflate.c>
  # Add file mime types to be compressed
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript

  #Set compression Highest 9 - Lowest 1
  DeflateCompressionLevel 9

  # If you must enable these lines, - obsolete browser
  #BrowserMatch ^Mozilla/4 gzip-only-text/html
  #BrowserMatch ^Mozilla/4\.0[678] no-gzip
  #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html


  # Setup custom deflate log - enable only for testing
  # Eats CPU time hence disable after testing 
  DeflateFilterNote Input instream
  DeflateFilterNote Output outstream
  DeflateFilterNote Ratio ratio
  LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
  #CustomLog logs/deflate.log deflate


  # Make sure proxies don't deliver the wrong content
  <IfModule mod_headers.c>
	Header append Vary User-Agent env=!dont-vary
  </IfModule>

</IfModule>
# DEFLATE Module Settings End

All the best
Ric :)

#8 PatriciaRits

PatriciaRits

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows XP

Posted 02 November 2009 - 12:23 PM

Hi Ric,

Thanks very much for your resilience in this!

I will follow up on your instructions tomorrow - I just closed everything down when I got this message - and will let you know if my US installation survived. ;-)

Cheers,
Patricia

#9 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 02 November 2009 - 06:35 PM

If it fails I will post the modified file.

All the best
Ric :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users