View Issue Details

IDProjectCategoryView StatusLast Update
16293Bug reportsSurvey takingpublic2020-08-11 21:55
ReporterJHoeck Assigned Tocdorin  
Status confirmedResolutionopen 
Product Version4.2.1 
Summary16293: Question Type: File Upload attached file is too big, no error message -> internal server error

If 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 Reproduce
  1. 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

developer   ~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

developer   ~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

manager   ~59204

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

developer   ~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.

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-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 sushmanadendla Note Added: 59204
2020-07-30 13:58 sushmanadendla File Added: 16293_Fileupload_MaxSize.png
2020-08-11 21:55 gabrieljenik Note Added: 59414