XF 2.0 RESOLVED: Image uploading issue

bostoneo

Member
Licensed customer
So I've seen a million threads on this and I've tried all of the settings that I've come across. I *know* I've missed something - but I haven't been able to figure it out.

Uploading images - I have the forum set to 5MB - image size isn't our problem. However it does seem that resolution size is. We get a generic error when attempting to upload images and I haven't found the "failure" point (ie where the limit is). Here are the config entries that I've modified.

config.php

PHP:
$config['db']['host'] = 'xxx';
$config['db']['port'] = '3306';
$config['db']['username'] = 'xxx';
$config['db']['password'] = 'xxx';
$config['db']['dbname'] = 'xxx';
$config['fullUnicode'] = true;
$config['maxImageResizePixelCount'] = 30000000;

php/7.2/fpm/php.ini
php/7.2/cli/php.ini
both have the same settings - I am running NGINX so fpm is the one in use

INI:
memory_limit = 256M
post_max_size = 35M
upload_max_filesize = 5M

and then my attachment settings are attached as images.
 

Attachments

  • dimensions.webp
    dimensions.webp
    6.3 KB · Views: 6
  • size.webp
    size.webp
    4.4 KB · Views: 5
What is the generic error?
Are you getting the error for all attachments, or just some (if the latter, any details would be useful).
 
You'd think I'd never worked in tech support (I do and have for 20 years) I know better.

Sorry about that. As for generic error - it doesn't pop anything up - it just draws a line through the image when doing "attach file". Generic error was probably not the right term.

As for a general idea of what works and what doesn't:

1224×1632 @560K works
1510×2689 @ 1M works
2448×2748 @ 1.5 does not
2180×2751 @ 1.3M does not
1904×2486 @ 1M does not
 
Try enabling Imagick PECL extension.

Admin control panel -> Setup -> Options -> Attachments -> Default image processor -> magemagick PECL extension
 
If you note my initial post - my image size is set to 5MB - and images tested are all 3MB and less. Can you expand on the "mod security" answer?

never mind - answered my own mod-security question.

Of note I'm noticing this in the NGINX log:
2018/06/27 14:45:38 [error] 20829#20829: *4208 client intended to send too large body: 2931161 bytes

Just about 3MB and again all settings are 5MB or greater.
 
Fixed it - that error above in the NGINX log led me to my answer.

In nginx.conf I needed to increase the

client_max_body_size 20M;

Once I did that and restarted NGINX all is well.
 
Back
Top Bottom