• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Upload filesize miscalculation results in File Size to Big

Luppie

Chevereto Member
▶ Reproduction steps
  1. Check max. upload size in Settings -> Image Upload
    Schermafbeelding 2021-06-10 135618.jpeg
  2. Update from 3.18.0 to 3.20.1 and/or 3.20.4
  3. Check max. upload size in Settings -> Image Upload
    Schermafbeelding 2021-06-10 135705.jpeg
😢 Unexpected result

The serverside PHP setting 16MB is miscalculated as 177.7kb

📃 Error log message

Upload File size is to big
 
I'm running PHP in FPM mode, the upload size is configured in /etc/php-fpm.d/144857680022849.conf (per domain configuration)

Schermafbeelding 2021-06-10 144810.jpeg
This is the relevant configuration part:
Code:
php_admin_value[upload_max_filesize] = 16777216
php_admin_value[post_max_size] = 16777216

As you can see in the screenshots the value hasn't changed (serverside) it is only calculated differently after the upgrade.
 
I'm running PHP in FPM mode, the upload size is configured in /etc/php-fpm.d/144857680022849.conf (per domain configuration)

View attachment 4087
This is the relevant configuration part:
Code:
php_admin_value[upload_max_filesize] = 16777216
php_admin_value[post_max_size] = 16777216

As you can see in the screenshots the value hasn't changed (serverside) it is only calculated differently after the upgrade.
no just no, you did it all wrong! it goes by normal calucation method. in php.ini you do in M format. if you want 16MB then you set 16M as upload limit in php.ini. Do not use 16777216 since that will make php.ini not understanding what it means.
 
I've changed it to 16M and it is working. Thank you for pointing that out.
Since I always try to learn from my mistakes, can someone explain it to me why it was working in 3.18 and not working in 3.20 ?
 
I have never used MB in php.ini values, I can't say that such nomenclature worked before. At least in my scope, perhaps there's some fuzzy mode that I'm unaware of.
 
no just no, you did it all wrong! it goes by normal calucation method. in php.ini you do in M format. if you want 16MB then you set 16M as upload limit in php.ini. Do not use 16777216 since that will make php.ini not understanding what it means.
I'm just following the official PHP configuration directives.
upload_max_filesize is an integer and integers never contains alpabetic characters.
Shorthand notation may be used.

upload_max_filesize int
The maximum size of an uploaded file.

post_max_size must be larger than this value.

When an int is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used.
Source

Looking at this I'm not doing it so wrong after all.
 
Back
Top