post-max-size exceeding error is not tracked
Bug #634193 reported by
Ruslan Kabalin
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Robert Lyon |
Bug Description
If post-max-size PHP setting (http://
This is partly related to bugs:
https:/
https:/
Given that this error is triggered by PHP prior to processing the code, it can't be catch through exception. As forums suggests, it may worth using error_get_last() and grep result for "PHP Warning: POST Content-Length of" string.
tags: | added: exception files |
Changed in mahara: | |
status: | New → Confirmed |
importance: | Undecided → Low |
Changed in mahara: | |
assignee: | nobody → Richard Mansfield (richard-mansfield) |
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
milestone: | none → 1.7.0 |
Changed in mahara: | |
milestone: | 1.7.0 → 1.8.0 |
Changed in mahara: | |
milestone: | 1.8.0rc1 → none |
Changed in mahara: | |
assignee: | nobody → Robert Lyon (robertl-9) |
Changed in mahara: | |
milestone: | none → 18.04.0 |
Changed in mahara: | |
milestone: | 18.04.0 → 18.10.0 |
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
milestone: | 18.10.0 → 19.04.0 |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Possible workaround is to set post-max-size much higher than upload_max_filesize in php ini/.htaccess file, so that post-max-size will never be hit.
Setting post-max-size and upload_max_filesize to equal value means that upload_max_filesize will never be triggered, any file equal to upload_max_filesize will trigger post-max-size (because post-max-size consider the whole POST header size which has some data apart of the file content, see bug #634829).
Setting post-max-size a little bit higher than upload_max_filesize will not help either, it will only produce traceable file upload error if the file size is between upload_max_filesize and post-max-size, so the probability of having file in this gap is relatively small.
Post-max-size has the highest priority over file-related errors. Say, if file is higher than post-max-size, corresponding error will be triggered first despite having MAX_FILE_SIZE hidden value and/or upload_max_filesize set to lower value.
There was a related discussion here: http:// mahara. org/interaction /forum/ topic.php? id=831