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

Download of files bigger than 10 MB fails

    XMLWordPrintable

Details

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-69355-master-filebuffer
    • Hide

      Setup

      1. Login as admin.
      2. Create a course with the Folder resource.
      3. Upload a file to the folder.

      Testing scenario

      1. Login as a student.
      2. Make sure that the file can be downloaded.
      3. Check there are no errors in your server logs.
      4. Change the https://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression in your PHP and repeat steps from 1 to 3.

      NOTE: When sharing the results, report your web server, PHP SAPI and downloading result for both zlib modes (on and off).

      Show
      Setup Login as admin. Create a course with the Folder resource. Upload a file to the folder. Testing scenario Login as a student. Make sure that the file can be downloaded. Check there are no errors in your server logs. Change the https://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression in your PHP and repeat steps from 1 to 3. NOTE: When sharing the results, report your web server, PHP SAPI and downloading result for both zlib modes (on and off).
    • 0
    • International 4.0 - Sprint 5, International 4.0 - Sprint 6, International 4.0 - Sprint 7

    Description

      Downloading files bigger than 10 MB ($filesize > 10000000) from assignments, files, folders etc. fails. I found this Apache error with debugging (DEVELOPER) on: mod_fcgid: stderr: PHP Warning: Cannot modify header information - headers already sent by (output started at /path/to/moodle/lib/filelib.php:2239) in /path/to/moodle/lib/filelib.php on line 2247, referer: https://example.com/mod/folder/view.php?id=20

      If I add two zeros to filelib.php:2239 ($filesize > 1000000000) then it works because the code from line 2239 until 2243 is not executed. I tested downloading files up to 230 MB which failed without the two zeros. I'm on an environment with Plesk and use PHP 7.2 run as FastCGI application served by Apache. I discovered the issue while upgrading (Git) from Moodle 3.6. I tried to replicate it with the Moodle Sandbox but there it works just fine.

       

       

      Attachments

        Issue Links

          Activity

            People

              mudrd8mz David Mudrák (@mudrd8mz)
              birdy1976 Martin Vögeli
              Simey Lameze Simey Lameze
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Michael Hawkins Michael Hawkins
              Votes:
              19 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 6 hours, 38 minutes
                  2d 6h 38m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.