Moodle
  1. Moodle
  2. MDL-15928

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      31236

      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

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          done, added into 1.9env test too

          Show
          Petr Škoda added a comment - done, added into 1.9env test too
          Hide
          Petr Škoda added a comment -

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

          Show
          Petr Škoda added a comment - reopening, the PHP ext is buggy on 64bit OS - can not open archive with large number of files
          Hide
          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
          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
          Petr Škoda 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
          Petr Škoda 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
          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
          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
          Petr Škoda added a comment -

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

          Show
          Petr Škoda 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: