View Issue Details

IDProjectCategoryView StatusLast Update
16293Bug reportsSurvey takingpublic2021-01-04 11:36
ReporterJHoeck Assigned To 
Status closedResolutionfixed 
Product Version4.2.1 
Summary16293: Question Type: File Upload attached file is too big, no error message -> internal server error
DescriptionIf the attached file is bigger than expected, the application will crash and it will raise an internal server error, see the big below.
Steps To Reproduce1. Create Survey
2. Create Question Group
3. Create Question with Question Type: File Upload
4. Preview or run the survey
5. Attach an file to the file upload which is bigger than 2048 KB
TagsNo tags attached.
Complete LimeSurvey version number (& build)irrelevant
I will donate to the project if issue is resolvedNo
Database & DB-Versionirrelevant
Server OS (if known)
Webserver software & version (if known)
PHP Versionirrelevant




2020-05-18 17:23


sample1.heic (293,608 bytes)


2020-07-24 18:29

manager   ~59084

Last edited: 2020-07-24 18:34

View 3 revisions

Can I ask you for a dump of your php info?
Specifically, I am looking for these values:
- file_uploads
- post_max_size
- upload_max_filesize

I believe that your file was bigger than the post_max_size.
Still, wasn't able to get the same error message.

Also, at last, the file you uploaded on this ticket "sample1.heic" is smaller than 2M


2020-07-28 21:33

manager   ~59138


Added a validation for empty $_POST and $_FILES, which is normally the case when post_max_size is exceeded. Without the validation, when post_max_size was exceeded, an "invalid extension" error was thrown or an HTTP 500 error (depending on debug mode).


2020-07-30 13:58


Tested the issue before pulling the PR, Issue exist. Tested the issue after pulling the PR, I still get the error even after clearing cache.
Please refer the attachment for more details
16293_Fileupload_MaxSize.png (51,877 bytes)   
16293_Fileupload_MaxSize.png (51,877 bytes)   


2020-08-11 21:55

manager   ~59414

The 500 error appears when uploading just the .heic file.
If uploading a regular file, the error should not appear.
Can you please confirm that?

Why the error happens on .heic files?
1 - The installation doesn't have the FileInfo extension
2 - The .heic file is not registered on the default "known extensions file" (framework/utils/fileExtensions.php).

Also the message shown is an advance message as
- The debug config is set to 1 or greater or the user is marked as force superadmin

1 - Enable FileInfo
2 - Add the .heic file to a "custom extensions" file.
     The file should be a copy of the default "known extensions file" with new entries.
     The file should be registred under the "magic_file" entry on the config file.


2020-08-20 15:44


I tested the issue happens only with the heic file


2020-08-20 15:50

manager   ~59560

This could be interesting to bring to the picture:


2020-09-15 17:56

manager   ~59836

Ok, not sure what is the current status of this one. I see in github that there are some issues with certain file extensions. It's pretty rare to have .heic files uploaded by users since Apple devices' photos are stored as .jpeg.


2020-09-16 17:36

manager   ~59850

It is not a bug.
If user enables Fileinfo it will work good.

If not, a workaround is to add heic as a custom extension.
Denis wrote something about that already here:


2020-09-17 08:43

developer   ~59858

The feature in pulll request is : allow to upload any file, now and in future.

To upload a new file type:

1. Need to be known by fileExtensions
2. Need to be known by OS `magic_database` : Fedora (my workstation) know heiv but not Debian 10 (my server)
3. Translation of file type to know extension :


2021-01-04 11:36

administrator   ~61408

Fixed in Release 4.4.0-RC2+210104

Issue History

Date Modified Username Field Change
2020-05-18 17:23 JHoeck New Issue
2020-05-18 17:23 JHoeck Status new => assigned
2020-05-18 17:23 JHoeck Assigned To => cdorin
2020-05-18 17:23 JHoeck File Added: fileupload_size_to_big_error.PNG
2020-05-18 17:23 JHoeck File Added: sample1.heic
2020-05-18 17:24 cdorin Priority none => high
2020-05-18 17:24 cdorin Status assigned => confirmed
2020-05-18 17:24 cdorin Zoho Sprints => |Yes|
2020-05-18 17:24 swendrich Zoho Sprints ID => 14469000000098001
2020-07-24 18:29 gabrieljenik Note Added: 59084
2020-07-24 18:33 gabrieljenik Note Edited: 59084 View Revisions
2020-07-24 18:34 gabrieljenik Note Edited: 59084 View Revisions
2020-07-28 21:33 gabrieljenik Note Added: 59138
2020-07-30 13:58 user225042 Note Added: 59204
2020-07-30 13:58 user225042 File Added: 16293_Fileupload_MaxSize.png
2020-08-11 21:55 gabrieljenik Note Added: 59414
2020-08-20 15:44 user225042 Note Added: 59556
2020-08-20 15:50 gabrieljenik Note Added: 59560
2020-09-15 17:56 cdorin Note Added: 59836
2020-09-15 17:56 cdorin Assigned To cdorin =>
2020-09-15 17:56 cdorin Status confirmed => feedback
2020-09-15 17:56 cdorin Zoho Sprints Yes => |Yes|
2020-09-16 17:36 gabrieljenik Note Added: 59850
2020-09-17 08:43 DenisChenu Note Added: 59858
2021-01-04 11:36 lime_release_bot Note Added: 61408
2021-01-04 11:36 lime_release_bot Status feedback => closed
2021-01-04 11:36 lime_release_bot Resolution open => fixed