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 committed 1 file to 'Moodle CVS' - 04/Aug/08 09:25 PM
MDL-15928 prevent parsing errors when zip ext missing
MODIFY lib/file/Attic/file_packer.php   Rev. 1.6    (+5 -3 lines)
Petr Skoda made changes - 04/Aug/08 09:28 PM
Field Original Value New Value
Link This issue has been marked as being related by MDL-14589 [ MDL-14589 ]
Petr Skoda committed 9 files to 'Moodle CVS' - 05/Aug/08 12:45 AM
MDL-15928 switched to zip PHP extensions
MODIFY version.php   Rev. 1.750    (+1 -1 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.216    (+1 -0 lines)
MODIFY backup/backuplib.php   Rev. 1.217    (+1 -8 lines)
MODIFY lib/db/upgrade.php   Rev. 1.222    (+8 -1 lines)
MODIFY admin/environment.xml   Rev. 1.35    (+6 -1 lines)
MODIFY lib/moodlelib.php   Rev. 1.1090    (+2 -172 lines)
MODIFY admin/settings/server.php   Rev. 1.48    (+1 -3 lines)
MODIFY lib/deprecatedlib.php   Rev. 1.96    (+70 -2 lines)
MODIFY install/stringnames.txt   Rev. 1.14    (+1 -0 lines)
Petr Skoda committed 3 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 05/Aug/08 12:46 AM
MDL-15928 switched to zip PHP extensions in HEAD - adding to env test
MODIFY install/stringnames.txt   Rev. 1.3.2.7    (+1 -0 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.154.2.52    (+1 -0 lines)
MODIFY admin/environment.xml   Rev. 1.24.2.7    (+5 -0 lines)
Petr Skoda added a comment - 05/Aug/08 12:46 AM
done, added into 1.9env test too

Petr Skoda made changes - 05/Aug/08 12:46 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Mitsuhiro Yoshida committed 5 files to 'Lang CVS' - 05/Aug/08 11:44 AM
MDL-15928 Translated a new string for admin.
MDL-15758 Translated a new string for forum.
MDL-14591 Translated new strings for portfolio.
Brushed up an automatically generated translation file for TinyMCE.
MODIFY ja_utf8/README   Rev. 1.776    (+1 -1 lines)
MODIFY ja_utf8/Attic/tinymce.php   Rev. 1.5    (+20 -20 lines)
MODIFY ja_utf8/portfolio.php   Rev. 1.6    (+8 -1 lines)
MODIFY ja_utf8/forum.php   Rev. 1.73    (+2 -1 lines)
MODIFY ja_utf8/admin.php   Rev. 1.285    (+2 -1 lines)
martignoni committed 1 file to 'Lang CVS' - 05/Aug/08 04:45 PM
MDL-15928 string for ZIP PHP extension
MODIFY fr_utf8/admin.php   Rev. 1.281    (+2 -1 lines)
Petr Skoda committed 1 file to 'Moodle CVS' - 06/Aug/08 07:28 PM
MDL-15928 comment improvement
MODIFY lib/moodlelib.php   Rev. 1.1091    (+3 -3 lines)
Petr Skoda committed 2 files to 'Moodle CVS' - 07/Aug/08 09:36 PM
MDL-15928 reverting previous commit - we might still need the binary zips because PHP ext is buggy on 64bit OS
MODIFY admin/settings/server.php   Rev. 1.49    (+2 -0 lines)
MODIFY lib/db/upgrade.php   Rev. 1.226    (+1 -9 lines)
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

Petr Skoda made changes - 07/Aug/08 09:37 PM
Status Resolved [ 5 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
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


Dan Marsden made changes - 12/Dec/08 04:02 PM
Link This issue is duplicated by MDL-17614 [ MDL-17614 ]
Petr Skoda committed 1 file to 'Moodle CVS' - 31/Dec/08 04:17 AM
MDL-15928 PHP 5.2.8 has new zip support - all know problems seem to be solved - yay!
MODIFY lib/packer/zip_archive.php   Rev. 1.3    (+9 -7 lines)
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!

Petr Skoda made changes - 31/Dec/08 04:18 AM
Resolution Fixed [ 1 ]
Status Reopened [ 4 ] Resolved [ 5 ]
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