Bug #60627
closed
TYPO3 // Install Tool / Check.php - checkMaximumFileUploadSize ignores the same value
Added by Christian Hünniger over 10 years ago.
Updated about 6 years ago.
Description
Hi
I found a bug in the file typo3_src/typo3/sysext/install/Classes/SystemEnvironment/Check.php on line 186 (\TYPO3\CMS\Install\SystemEnvironment\Check::checkMaximumFileUploadSize)
The error message
It is recommended that the value of upload_max_filesize is at least equal to the value
But if I set the value in the php.ini to the same value TYPO3_CONF_VARS[BE][maxFileSize] the errors throws again (look to the attached screenshot)
The code must be changed as follows
// old compare
if ($maximumUploadFilesize < $configuredMaximumUploadFilesize) {
// new compare
if ($maximumUploadFilesize <= $configuredMaximumUploadFilesize) {
Facts
TYPO3 Version: 6.2.3
Files
- Status changed from New to Needs Feedback
Please always update to the newest version. This has been fixed with 6.2.4, released on 8th of July.
Sorry mixed that up. The referenced fix was part of 6.2.2 actually.
Your suggested fix actually contradicts with the message of the OK-Status, so IMO the code is correct.
What values did you set in php.ini and what did you set in the Install Tool?
Did you debug that? I suspect a rounding issue with the value calculated from the php config
Ok
You are correct. It seems like a rounding issue.
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31873
- Status changed from Under Review to Needs Feedback
Please check if the pushed patch solves the issue.
Hm, looking at your debug output, I'd say your configuration is not correct.
Your TYPO3 config is 200000 (KB), that is of course not equal to 195 MB, as this is 195.3125 MB, or if you put into bytes 204800000 bytes.
195 MB = 204472320 bytes.
Ok
You are correct again ;)
This is the default value from TYPO3 (I've never changed this value) however, see attached debug_2 screen. Here you can see a wrong conversation / rounding.
This is no rounding issue. The code uses only bytes and not megabytes; there's no division in the code.
My first suspicion was that the calculation doubleval(php_ini_value) * 1024 * 1024 gives some weird numbers somewhere on the 10th decimal place, which would have corrupted the if-condition later. But in fact it does not, as we can see in your debug outputs.
Please set you php_value to 200000K or 200 MB and you're fine.
I'll change my patch to improve the message to show the value in KB.
Okay,
Thank you for your fast support.
- Status changed from Needs Feedback to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31873
You are welcome. Please test the patch and vote on Gerrit. Thanks
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31881
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF