Keyword

Can't upload image size 3.6mb

  • saovry
  • saovry's Avatar Topic Author
  • Offline
  • Senior Member
More
4 years 1 month ago #178362 by saovry
Can't upload image size 3.6mb was created by saovry
It shows the white page when I upload a large image. My PHP allow 40mb but my picture size is 3.6m, it can't upload.
 

here is the error
 

The problem is happen at Front page and back end during upload... most of my pictures that I must to upload starts from 3mb -7mb

K2 v2.10.4 [Dev Build 20210205]
PHP version 7.4.15
Database version 5.7.33
GD image library bundled (2.1.0 compatible)
Multibyte string support Enabled
Upload limit 300M
Memory limit 64M

I am using JCE and it uploads without any problem.
Attachments:

Please Log in or Create an account to join the conversation.

More
4 years 3 weeks ago #178429 by JoomlaWorks
Replied by JoomlaWorks on topic Can't upload image size 3.6mb
Set error reporting to "maximum" in Joomla's Global Configuration and reload the page that *should* show some error. Paste the error back here.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • saovry
  • saovry's Avatar Topic Author
  • Offline
  • Senior Member
More
4 years 2 weeks ago #178599 by saovry
Replied by saovry on topic Can't upload image size 3.6mb
Here is the error

Notice: Trying to access array offset on value of type int in /home/admin/public_html/khmercdp.org/media/k2/assets/vendors/verot/class.upload.php/src/class.upload.php on line 2769

thank for your support

Please Log in or Create an account to join the conversation.

More
4 years 2 weeks ago #178606 by Nikola
Replied by Nikola on topic Can't upload image size 3.6mb
+1 here, I've had the same problem for ages! I usually instruct users to scale images down to 1080p before uploading (they usually don' need larger images for their websites anyway), but some of them forget this from time to time, and that's when this error occurs. It's a really old issue, actually, hopefully it can easily be fixed.

Please Log in or Create an account to join the conversation.

More
4 years 2 weeks ago #178632 by Goble002
Replied by Goble002 on topic Can't upload image size 3.6mb
increase memory_limit in php.ini

Please Log in or Create an account to join the conversation.

  • saovry
  • saovry's Avatar Topic Author
  • Offline
  • Senior Member
More
4 years 1 week ago #178633 by saovry
Replied by saovry on topic Can't upload image size 3.6mb
Here is my information

max_execution_time 30
max_file_uploads 40
max_input_nesting_level 64
max_input_time 60
max_input_vars 1000
memory_limit 64M
post_max_size 30M

Please Log in or Create an account to join the conversation.

More
4 years 1 week ago #178634 by Goble002
Replied by Goble002 on topic Can't upload image size 3.6mb
@saovry, like I said push the memory_limit higher

Please Log in or Create an account to join the conversation.

  • saovry
  • saovry's Avatar Topic Author
  • Offline
  • Senior Member
More
4 years 1 week ago #178662 by saovry
Replied by saovry on topic Can't upload image size 3.6mb
I increased my memory_limit 64M to memory_limit 1024M, it really helps me to upload a large image now..
I am really thank you..

I hope K2 can fix it with the next release even though some users small memory_limit.

thank u

Please Log in or Create an account to join the conversation.

More
4 years 1 week ago #178670 by JoomlaWorks
Replied by JoomlaWorks on topic Can't upload image size 3.6mb
K2 respects the upload limits configured by the server and Joomla - and it should stay that way for obvious reasons.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #178872 by Nikola
Replied by Nikola on topic Can't upload image size 3.6mb
@Goble002 thank you for insisting on memory_limit, it needed pushing up to 512M in order to process some large images. It sits at 1024M now, not too happy about it, but this was a much larger problem for me than worrying about exhausting resources (which won't happen anyway). So thanks again, you've helped A LOT!

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #178877 by JoomlaWorks
Replied by JoomlaWorks on topic Can't upload image size 3.6mb
A high memory limit is not a problem if you use PHP-FPM and can control how many threads PHP can open at any given time. A good rule is to use "ondemand" mode in PHP-FPM with a thread count of 80%-100% of your available CPUs. So if your server has 8 CPUs, use 8 for pm.max_children (the thread count for PHP-FPM). That means your server will never require more than 8 GBs of RAM assuming you have a 1024M memory limit.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago - 3 years 11 months ago #178886 by Nikola
Replied by Nikola on topic Can't upload image size 3.6mb
Fotis, thank you very much for further clarification! Not using PHP-FHM at the moment, but will definitely reconfigure Apache in the nearby future. My most troublesome server (regarding this particular problem) is a 6-core Xeon with 32 GB of physical memory running solely as a dedicated web server, so I think I wouldn't face this problem anyway, but it's good to set limits, just in case.
Last edit: 3 years 11 months ago by Nikola.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum