Me acaban de recomendar que edite el fichero Edita el fichero "lib/filelib.php" y busca "function readfile_allow_large. Cuando lo haya probado os cuento.
Re: Copia de Seguridad de un curso se descarga con 0 bytes
de Francisco Gómez -
Número de respuestas: 2
En respuesta a Francisco Gómez
Re: Copia de Seguridad de un curso se descarga con 0 bytes
de Francisco Gómez -
La solución estaba en:
https://tracker.moodle.org/browse/MDL-69355
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.
Editando el fichero "lib/filelib.php" que está en :\xampp\htdocs\moodle\lib
Simplemente añadiendo un dos 0 a if ($filesize > 100000000) {
Por lo que queda así if ($filesize > 1000000000) {
Se reinicia Xampp y todo resuelto.
Ya se pueden descargar todo tipo de ficheros mayores de 10 megas.
Saludos,
Francisco.
https://tracker.moodle.org/browse/MDL-69355
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.
Editando el fichero "lib/filelib.php" que está en :\xampp\htdocs\moodle\lib
Simplemente añadiendo un dos 0 a if ($filesize > 100000000) {
Por lo que queda así if ($filesize > 1000000000) {
Se reinicia Xampp y todo resuelto.
Ya se pueden descargar todo tipo de ficheros mayores de 10 megas.
Saludos,
Francisco.
En respuesta a Francisco Gómez
Re: Copia de Seguridad de un curso se descarga con 0 bytes
Excelente Francisco.
También tenía ese problema y pude solucionar gracias al hilo detallado que hiciste.
Una sola acotación, no es necesario reiniciar el Apache ya que es un archivo .php propio de moodle.
Muchas gracias
Atte. Alexis Arnal
amarnal@unexpo.edu.ve
Guarenas-Venezuela