XF 2.2 problems with GD Image AND Imagemagick!

zoldos

Well-known member
I haven't noticed this until recently (but hadn't uploaded a large pic yet, so I don't know).

Anyway, when Imagemagick PECL extension is selected in Admin --> Attachments (and it does show it as enabled on both XF Admin and my cPanel), animated GIFs work properly when posted in a thread, but, I cannot upload image attachments larger than say less than 1MB (after the upload on large files gets to 100%, I just see a blank placeholder). But, if I select PHP built-in GD image library (PHP 8.1.18), animated GIFs stop working, and then, large images can be uploaded (with thumbnails, etc).

Very strange! I disabled image proxy and tried it, and got the same result regardless of that setting.

Max attachment uploads are set to 12MB.

This seems rather specific, and I don't get any server errors. Does anyone have any idea what could be wrong? Thanks!
 
I haven't noticed this until recently (but hadn't uploaded a large pic yet, so I don't know).

Anyway, when Imagemagick PECL extension is selected in Admin --> Attachments (and it does show it as enabled on both XF Admin and my cPanel), animated GIFs work properly when posted in a thread, but, I cannot upload image attachments larger than say less than 1MB (after the upload on large files gets to 100%, I just see a blank placeholder). But, if I select PHP built-in GD image library (PHP 8.1.18), animated GIFs stop working, and then, large images can be uploaded (with thumbnails, etc).

Very strange! I disabled image proxy and tried it, and got the same result regardless of that setting.

Max attachment uploads are set to 12MB.

This seems rather specific, and I don't get any server errors. Does anyone have any idea what could be wrong? Thanks!
This still has me stumped. Almost like there is some hard coded size limit. Pics of 1 or 2MB work....but like 7MB+, don't (despite attachment max size 12MB and PHP uploads set to 32MB)... :(

Any clues?
 
Have you checked your PHP limits?
Specifically
PHP upload_max_filesize
Have you generated a custom PHP info page to check your site settings for?
 
Its because its making each frame post upload which goes over the pre defined limit. Try this: take a small animated image and test that. Does it work?
 
GD doesn’t support resizing GIFs, never has, probably never will - so that part at least isn’t buggy.

It does seem weird about ImageMagick though… guessing nothing is showing in any logs (don’t just check XF’s log, but other logs on the server)
 
It does seem weird about ImageMagick though… guessing nothing is showing in any logs (don’t just check XF’s log, but other logs on the server
I'm not sure if I have access to the correct logs on my shared server. I saw no errors of any kind in the ACP. I did get an "Opps....we ran into some problems" when drag/dropping a 7.79MB pic directly into a post, if that helps...
 
If you are on shared hosting, then with large images you may be running into a memory limitation on processing them. In many cases, processing a large image is fairly memory intensive, and a shared hosting environment may not support that. It's simply a limitation on many shared hosting plans that, even though they offer "unlimited this and that" they don't really deliver.
 
Yes, I thought about that....here are my current relevant PHP settings:

PHP memory_limit: 1G
PHP post_max_size: 1G
PHP upload_max_filesize: 1G
PHP max_input_vars: 1000
PHP max_execution_time: 250
 
Even though you have those settings "set", does your shared hosting provider actually honor them? That is a major issue you have on shared hosting providers. Have you actually asked them to research their server level logs to see if there is an issue?
 
Thanks, @Brogan! PHP uploads are set to 1G across the board. I'm in contact with my host and they are checking the issue. Also, here is the ImageMagick version I'm using: ImageMagick 7.1.0-62 Q16-HDRI x86_64 20885

:cool:
 
My host said they saw this error in the error logs:

[Sun May 21 20:42:55.181797 2023] [lsapi:error] [pid 1729038:tid 47274369017600] [remote xxxx] [host bloodofsouls.com] Error on sending request(POST /attachments/upload?type=post&context[thread_id]=119&hash=b955d32fd88ff6f7 HTTP/2.0); uri(/index.php?type=post&context[thread_id]=119&hash=b9553dffd88ff6f7) content-length(8095607): ReceiveAckHdr: nothing to read from backend (LVE ID 1513), check http://docs.cloudlinux.com/mod_lsapi_troubleshooting.html, referer: https://bloodofsouls.com/threads/119/

I changed the hash. lol Anyway, prior to this, it was a modsec issue. They disabled modsec, and now it throws the above.

BUT, check this out, files, like zip files, seem to work. I easily uploaded a 10+ MB file without issue. But an IMAGE file of that size, doesn't work. Does this narrow it down at all?
 
My host said they saw this error in the error logs:



I changed the hash. lol Anyway, prior to this, it was a modsec issue. They disabled modsec, and now it throws the above.

BUT, check this out, files, like zip files, seem to work. I easily uploaded a 10+ MB file without issue. But an IMAGE file of that size, doesn't work. Does this narrow it down at all?

https://forums.cpanel.net/threads/mod_lsapi-and-wordpress.650141/[/URL Worth reading.
 
Top Bottom