note 119869 modified in features.file-upload.common-pitfalls by cmb
| From: | cmb@php.net | Date: | Fri, 09 Sep 2016 16:44:46 +0000 |
| Subject: | note 119869 modified in features.file-upload.common-pitfalls by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206542@lists.php.net to get a copy of this message | ||
[Editor's note: to be more precise, MAX_FILE_SIZE can't exceed PHP_INT_MAX before PHP
7.1.]
Please note that the field MAX_FILE_SIZE cannot exceed 2147483647. Any greater value will lead to an
upload error that will be displayed at the end of the upload
This is explained by the related C code :
if (!strcasecmp(param, "MAX_FILE_SIZE")) {
max_file_size = atol(value);
}
The string is converted into a long int, which max value is... 2147483647
Seems to be corrected since php-7.1.0beta3
(https://github.com/php/php-src/commit/cb4c195f0b85ca5d91fee1ebe90105b8bb68356c)
--was--
Please note that the field MAX_FILE_SIZE cannot exceed 2147483647. Any greater value will lead to an
upload error that will be displayed at the end of the upload
This is explained by the related C code :
if (!strcasecmp(param, "MAX_FILE_SIZE")) {
max_file_size = atol(value);
}
The string is converted into a long int, which max value is... 2147483647
Seems to be corrected since php-7.1.0beta3
(https://github.com/php/php-src/commit/cb4c195f0b85ca5d91fee1ebe90105b8bb68356c)
http://php.net/manual/en/features.file-upload.common-pitfalls.php