-
Bug
-
Resolution: Fixed
-
Blocker
-
2.0.2
-
Ubuntu/10.10; PHP/5.3.3-1ubuntu9.3 with Suhosin-Patch; Apache/2.2.16
-
MOODLE_20_STABLE
-
MOODLE_23_STABLE
-
MDL-27156_part2 -
Files in the file system repository should not be limited by the PHP max file size.
Steps:
1. Setup file system repository in the moodledata/repository/examplerepository and enable the folder in: Site administration > Plugins > Repositories > Manage repositories > File System > Settings > Create a Repository Instance
2. Copy a file to the repository using the file system that is larger than the PHP upload_max_file_size setting
3. Create a new Page in a Course
4. Attempt to link to the file from the Page using the File Picker
Expected result:
- Link to the file from the file system repository is created in the page
Actual result:
- File is apparently bigger than max file size
This problem has been discussed in the forum, with workarounds requiring access to either .htaccess, php.ini, or a non-moodle file hosting site. http://moodle.org/mod/forum/discuss.php?d=166497 http://moodle.org/mod/forum/discuss.php?d=158886
In my testing, the PHP max file size upload is 2MB and the PHP post max size is 8MB (ie., upload_max_filesize=2M and the post_max_size=8M)
Any files larger than 2MB fail to be included from the file system repository, even though they are already on the file system and shouldn't in principle be limited to the PHP upload or post limits.
The applicable lines in code are:
repository/filepicker.php;96:
$moodle_maxbytes = get_max_upload_file_size();
repository/repository_ajax.php;86:
$moodle_maxbytes = get_max_upload_file_size();
If the user interface repository file pickers do not assume that all file transfers need to go through the PHP upload routine, then the file system repository links should succeed regardless of upload_max_filesize.
- blocks
-
MDLQA-2500 CLONE - Backup and restore activity with files references: Restoring after source files are deleted
- Passed
- caused a regression
-
MDL-34023 file_save_draft_area_files() ignores moodle/course:ignorefilesizelimits
-
- Closed
-
- Discovered while testing
-
MDL-33760 Page description doesn't observe site/course file size limits
-
- Closed
-
-
MDL-30794 Deleting a site level file repository causes an error to be displayed
-
- Closed
-
-
MDL-33725 'Add 2 grade conditions to form' loses url parameters
-
- Closed
-
-
MDL-33717 File manager should display a better message when the user is exempt from file size limits
-
- Closed
-
-
MDL-33799 /backup/restorefile.php should check the return value of $form->save_file()
-
- Closed
-
-
MDL-33889 Resolve the inconsistencies with file size limitations
-
- Closed
-
- has a non-specific relationship to
-
MDL-31789 Teacher can not access a local system file repository in his course.
-
- Closed
-
-
MDL-33766 My private files does not properly handle userquota & maxbytes and empty itself
-
- Closed
-
-
MDL-30667 Upload maximum settings are not always followed while $CFG->maxbytes is set to a different value
-
- Closed
-
- has been marked as being related by
-
MDL-32674 Teacher Course file upload limit should be restricted by site limit rather than course limit
-
- Closed
-
- is duplicated by
-
MDL-34861 File Repository Course Restores now Limited by PHP Upload Limit
-
- Closed
-