Issue Details (XML | Word | Printable)

Key: MDL-15928
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: Martin Dougiamas
Votes: 0
Watchers: 4
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Switch to using internal PHP zip and drop support for binary zip and pcl zip

Created: 04/Aug/08 05:07 PM   Updated: 15/Feb/09 12:47 AM
Return to search
Component/s: Lib
Affects Version/s: 1.9.2
Fix Version/s: 2.0

Issue Links:
Duplicate
 
Relates
 

Participants: Martin Dougiamas, Martín Langhoff, pavel and Petr Skoda
Security Level: None
Resolved date: 31/Dec/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
(from discussion with Petr working on File 2.0)

Using binary zip and pclzip both has problems. PHP 5.2.0 now has a proper zip extension - we should switch to that for Moodle 2.0

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda added a comment - 05/Aug/08 12:46 AM
done, added into 1.9env test too

Petr Skoda added a comment - 07/Aug/08 09:37 PM
reopening, the PHP ext is buggy on 64bit OS - can not open archive with large number of files

pavel added a comment - 12/Aug/08 09:04 PM
http://tracker.moodle.org/browse/MDL-16008
In an installation time moodle there is a following message

Notice: Undefined property: stdClass::$release in C:\Moodle_2_0_Windows\server\moodle\lib\environmentlib.php on line 528

php_extension zip must be installed and enabled

The Zip PHP extension is now required by Moodle, info-ZIP binaries or PclZip library are not used anymore.

after that installation stops


Petr Skoda added a comment - 31/Dec/08 04:18 AM
1/ the release problem should be already fixed
2/ PHP 5.2.8 has new zip support - seems to work fine - yay!

Martín Langhoff added a comment - 12/Feb/09 03:21 PM
(Landed here from discussion in GDF). I am curious. This new PHP zip extension... does it work with a fixed memory buffer, or does it allocate memory "as needed"?

If it's the second case, it may be fine for cli scripts, but it will be a complete disaster for Moodle, specially if we end up losing the option of using the external binaries.

In other words, the php 'zip' extension may exist and work bug-free, but depending on its internal implementation, it may still be a fundamentally bad idea to use it in mod_php living inside apache.

One way to test it is to zip and unzip something very large – say, an ubuntu iso – from a PHP script. Does the mem usage of the process grow to the size of the thing being zipped/unzipped or does it stay stable?


Petr Skoda added a comment - 15/Feb/09 12:47 AM
All compression is handled by self-contained classes, anybody can implement new compression type including zip command line