View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
18272Bug reportsImport/Exportpublic2022-08-04 15:40
ReporterFrustrated Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status assignedResolutionopen 
Product Version5.3.x 
Summary18272: getMaximumFileUploadSize() returns zero if post_max_size is set to 0 in php.ini
Description

The function getMaximumFileUploadSize() incorrectly returns zero of the PHP configuration file php.ini has post_max_size set to 0.

According to the documentation in php.ini this should disable the maximum size of an uploaded file:

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; https://php.net/post-max-size
post_max_size = 0

Steps To Reproduce

Steps to reproduce

Edit your system's php.ini file (/etc/php/8.1/fpm/php.ini, for instance) to

post_max_size = 0

Try to upload a vvexport file, for instance.

Expected result

Should upload, not show message "Sorry, this file is too large. Only files up to 0.0 MB are allowed."

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)Version 5.3.12+220502 + 3.28.9
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)Linux
Webserver software & version (if known)not relevant
PHP VersionPHP 8.1.2 + 7.4

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

ollehar

ollehar

2022-07-25 10:17

administrator   ~71116

Hm, this is not a change in PHP 8.1, is it?

DenisChenu

DenisChenu

2022-07-25 11:15

developer   ~71117

Can confirm in 3.28.9 / PHP 7.4

DenisChenu

DenisChenu

2022-07-25 11:16

developer   ~71118

Confirm and debin/linux, nginx+mariadb

Frustrated

Frustrated

2022-07-25 15:44

reporter   ~71120

I can't speak for previous editions of PHP but in 7.4 the configuration file is similar:

/etc/php/7.4/apache2

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 0

Issue History

Date Modified Username Field Change
2022-07-24 01:05 Frustrated New Issue
2022-07-25 10:17 ollehar Note Added: 71116
2022-07-25 10:17 ollehar Bug heat 0 => 2
2022-07-25 11:15 DenisChenu Status new => confirmed
2022-07-25 11:15 DenisChenu Note Added: 71117
2022-07-25 11:15 DenisChenu Bug heat 2 => 4
2022-07-25 11:16 DenisChenu Complete LimeSurvey version number (& build) Version 5.3.12+220502 => Version 5.3.12+220502 + 3.28.9
2022-07-25 11:16 DenisChenu Browser n/a => not relevant
2022-07-25 11:16 DenisChenu Database type & version postgres (PostgreSQL) 14.4 (Ubuntu 14.4-0ubuntu0.22.04.1) => not relevant
2022-07-25 11:16 DenisChenu Server OS (if known) Linux george 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux => Linux
2022-07-25 11:16 DenisChenu Webserver software & version (if known) Server version: Apache/2.4.54 (Ubuntu)Server built: 2022-06-08T15:59:33 => not relevant
2022-07-25 11:16 DenisChenu PHP Version PHP 8.1.2 => PHP 8.1.2 + 7.4
2022-07-25 11:16 DenisChenu Note Added: 71118
2022-07-25 15:44 Frustrated Note Added: 71120
2022-07-25 15:44 Frustrated Bug heat 4 => 6
2022-08-04 15:40 gabrieljenik Assigned To => gabrieljenik
2022-08-04 15:40 gabrieljenik Status confirmed => assigned