From: Oliver B. <li...@gm...> - 2006-09-13 16:52:21
|
Hi All, when I try to "Upload" a ZIP dump, or "Load" it from a server directory, I get a | lib/ziplib.php:193: Error: CRC32 mismatch error. The ZIP file is o.k. (although it is _not_ a full ZIP dump as requested but only contains the last version). Using the file as pgsrc, I get the error after four loaded pages. Any hints? TIA, Oliver -- Oliver Betz, Muenchen |
From: Reini U. <ru...@x-...> - 2006-09-14 06:47:55
|
Oliver Betz schrieb: > Hi All, > > when I try to "Upload" a ZIP dump, or "Load" it from a server > directory, I get a > > | lib/ziplib.php:193: Error: CRC32 mismatch > > error. The ZIP file is o.k. (although it is _not_ a full ZIP dump as > requested but only contains the last version). > > Using the file as pgsrc, I get the error after four loaded pages. > > Any hints? zip -F zipfile -- Reini Urban http://phpwiki.org/ http://murbreak.at/ http://helsinki.at/ http://spacemovie.mur.at/ |
From: Oliver B. <li...@gm...> - 2006-09-14 07:50:33
|
Reini Urban wrote: > > | lib/ziplib.php:193: Error: CRC32 mismatch > > > > error. The ZIP file is o.k. (although it is _not_ a full ZIP dump as > > requested but only contains the last version). > > > > Using the file as pgsrc, I get the error after four loaded pages. > > > > Any hints? > > zip -F zipfile since zip -T reported no errors (that's what I meant writing "The ZIP file is o.k."), zip -F didn't fix anything. I extracted the ZIP file without any problems, and I could use the extracted files as pgsrc. So I think it's an error in PhpWiki 1.3.12p3 or the PHP installation of my isp. Oliver -- Oliver Betz, Muenchen |
From: Reini U. <ru...@x-...> - 2006-09-15 05:49:25
|
Oliver Betz schrieb: > Reini Urban wrote: > >>> | lib/ziplib.php:193: Error: CRC32 mismatch >>> >>> error. The ZIP file is o.k. (although it is _not_ a full ZIP dump as >>> requested but only contains the last version). >>> >>> Using the file as pgsrc, I get the error after four loaded pages. >>> >>> Any hints? >> zip -F zipfile > > since zip -T reported no errors (that's what I meant writing "The ZIP > file is o.k."), zip -F didn't fix anything. > > I extracted the ZIP file without any problems, and I could use the > extracted files as pgsrc. > > So I think it's an error in PhpWiki 1.3.12p3 or the PHP installation > of my isp. Can you send me your ZIP please to rei...@gm... I fixed a problem with loadfile and archived version to recreate the old versions recently in CVS. But a CRC32 problem would be interesting. -- Reini Urban http://phpwiki.org/ http://murbreak.at/ http://helsinki.at/ http://spacemovie.mur.at/ |
From: Bob A. <apt...@cy...> - 2006-10-08 00:57:09
|
Hi, Reini Urban wrote: [...] > Can you send me your ZIP please to rei...@gm... > > I fixed a problem with loadfile and archived version to recreate the old > versions recently in CVS. But a CRC32 problem would be interesting. I ran into the same trouble tonight importing a zip dump from 1.3.10 into a fresh installation of 1.3.12p3 - I have some diagnostic info and a workaround. Hint: the problem is with the CRC32 checksum comparison, not the zip files. First, in order to get better diagnostics, I changed lib/ziplib.php to: 186 function zip_inflate ($data, $crc32, $uncomp_size) 187 { 188 if (function_exists('gzinflate')) { 189 $data = gzinflate($data); 190 if (strlen($data) != $uncomp_size) 191 trigger_error("not enough output from gzinflate", E_USER_ERROR); 192 # if (zip_crc32($data) != $crc32) 193 $zcrc32 = zip_crc32($data); 194 if ($zcrc32 != $crc32) 195 trigger_error("CRC32 mismatch: calculated=$zcrc32, expected=$crc32 ", E_USER_ERROR); 196 return $data; 197 } My zip file upload fails with: lib/ziplib.php:195: Error: CRC32 mismatch: calculated=-337476845, expected=3957490451 Note that 2^32 = 4294967296 and 4294967296 - 337476845 = 3957490451 My guess is there's some problem with signed vs unsigned 32-bit integers, pack/unpack, or something along those lines - once I changed lib/ziplib.php to 186 function zip_inflate ($data, $crc32, $uncomp_size) 187 { 188 if (function_exists('gzinflate')) { 189 $data = gzinflate($data); 190 if (strlen($data) != $uncomp_size) 191 trigger_error("not enough output from gzinflate", E_USER_ERROR); 192 # if (zip_crc32($data) != $crc32) 193 $zcrc32 = zip_crc32($data); 194 195 if ($zcrc32 < 0) { 196 $zcrc32 += 4294967296; 197 } 198 199 if ($zcrc32 != $crc32) 200 trigger_error("CRC32 mismatch: calculated=$zcrc32, expected=$crc32 ", E_USER_ERROR); 201 return $data; 202 } the zip file uploaded and imported just fine. Well, it stopped importing anything past the first version of a page (not what I wanted) but I've been fighting with that particular problem for *years* with phpwiki. I worked around the CRC issue at least. hth, -- Bob |