Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-15928

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.2
    • Fix Version/s: 2.0
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      (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

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            skodak Petr Skoda added a comment -

            done, added into 1.9env test too

            Show
            skodak Petr Skoda added a comment - done, added into 1.9env test too
            Hide
            skodak Petr Skoda added a comment -

            reopening, the PHP ext is buggy on 64bit OS - can not open archive with large number of files

            Show
            skodak Petr Skoda added a comment - reopening, the PHP ext is buggy on 64bit OS - can not open archive with large number of files
            Hide
            ptyt pavel added a comment -

            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

            Show
            ptyt pavel added a comment - 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
            Hide
            skodak Petr Skoda added a comment -

            1/ the release problem should be already fixed
            2/ PHP 5.2.8 has new zip support - seems to work fine - yay!

            Show
            skodak Petr Skoda added a comment - 1/ the release problem should be already fixed 2/ PHP 5.2.8 has new zip support - seems to work fine - yay!
            Hide
            martinlanghoff Martín Langhoff added a comment -

            (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?

            Show
            martinlanghoff Martín Langhoff added a comment - (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?
            Hide
            skodak Petr Skoda added a comment -

            All compression is handled by self-contained classes, anybody can implement new compression type including zip command line

            Show
            skodak Petr Skoda added a comment - All compression is handled by self-contained classes, anybody can implement new compression type including zip command line

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10