Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003765 [Quercus] major always 11-16-09 15:00 06-21-12 00:57
Reporter dobes_vandermeer View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 4.0.0
Summary 0003765: WordPress plugin installation corrupts or truncates larger files
Description This is in the version of quercus included with resin 4.0.1.

In Quercus some plugins cannot be installed because some files are corrupted when they are extracted from the plugin ZIP file.

The issue seems to be that the PclZip class they are using to extract files does not work in Quercus.

For example if I install WordPress 2.8.6 and use the "Add New Plugin" feature to search for, install, and activate the "Flutter" plugin, several of the files are truncated.

This seems related to two things:

1. fread() isn't returning the full length of data requested
2. Concatenating the results of several calls to fread() together into a string and passing that to gzinflate results in corrupt/invalid output.

Part 1 I reported elsewhere and I subsequently fixed the code in WordPress' PclZip library to call fread() until it got all the data it asked for. Unfortunately, the resulting string doesn't decompress correctly - everything after the first read()'s result is garbled. I suspect this may be related to the fact that we're working with binary data, and so this may reveal some incompatibility between the way Quercus is handling binary data in strings and the way PHP handles them.

Additional Information
Attached Files

- Relationships

- Notes
(0004297)
dobes_vandermeer
11-16-09 16:59

The only successful workaround so far is to not use that updater but to manually get the zip file and unzip it yourself.

I did try changing their unzip method to use the PHP built-in zip method (zip_open(), zip_read(), etc..) but that one doesn't seem to be working properly; I've filed a bug separately reporting the bug in the zip_*() functions.
 
(0004299)
dobes_vandermeer
11-16-09 20:57

See http://bugs.caucho.com/view.php?id=3767 [^] for a new version of unzip_file and supporting java code that extracts a ZIP file somewhere. This got the install feature working for me.
 
(0005463)
timowest
08-25-11 03:53

Any chance to get this fixed soon?

Wordpress is advertised as a supported application, but a simple task like theme installation doesn't work because ZIP support is broken?
 
(0005912)
nam
06-21-12 00:57

php/1v0z

Fixed for 4.0.29.
 

- Issue History
Date Modified Username Field Change
11-16-09 15:00 dobes_vandermeer New Issue
11-16-09 16:59 dobes_vandermeer Note Added: 0004297
11-16-09 20:57 dobes_vandermeer Note Added: 0004299
08-25-11 03:53 timowest Note Added: 0005463
08-27-11 08:35 kdecherf Issue Monitored: kdecherf
06-21-12 00:57 nam Status new => assigned
06-21-12 00:57 nam Assigned To  => nam
06-21-12 00:57 nam Status assigned => closed
06-21-12 00:57 nam Note Added: 0005912
06-21-12 00:57 nam Resolution open => fixed


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
38 total queries executed.
31 unique queries executed.
Powered by Mantis Bugtracker