News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Attachment prevents View Post

Started by DeVIL-I386, March 06, 2012, 04:29:17 PM

Previous topic - Next topic

DeVIL-I386

Probably provides the forum software does not create a preview image, because the graphics are too complex and therefore too much computing time claimed or ram.



Edited by emanuele: since the topic was unreachable due probably to the images I deleted both and replaced with a zip version.

emanuele

Quote from: DeVIL-I386 on March 06, 2012, 04:29:17 PM
Probably provides the forum software does not create a preview image, because the graphics are too complex and therefore too much computing time claimed or ram.
May I ask you how did you manage to attach the image? ???

I tried several times on my test forum (and once here), but I wasn't able to let the image pass unless I change the memory limit to something like 300 MB...


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

DeVIL-I386

Quote from: emanuele on March 07, 2012, 07:46:09 AM
May I ask you how did you manage to attach the image?
I have attached it as a normal attachment.

In any case, this problem is very annoying. Once I attach such an image to a post, this is no longer displayed on the bulletin board. The fix is ​​the only switch off the preview image.

My next topic serves as a demonstration.

DeVIL-I386

#3
empty

emanuele

Would you please stop attaching that image?
Thank you very much.
We got it's a problem and we are trying to figure out how to fix it, the two images are attached to the first post of the topic as zip and can be used to debug. Blocking the topic every once in a while doesn't really provide any useful information. ;)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

emanuele

Quote from: DeVIL-I386 on March 07, 2012, 12:40:04 PM
Quote from: emanuele on March 07, 2012, 07:46:09 AM
May I ask you how did you manage to attach the image?
I have attached it as a normal attachment.
The problem here is that I cannot attach it...
Let's see if someone else has any idea on how that can be.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

DeVIL-I386


DeVIL-I386

#7
In another SMF forum, which works on the first time. <- I'm not sure. Here it is different. But I have just noticed. Add your review without an attachment. After you click on Edit. Now you can attach the graphic.

emanuele

#8
The problem is easily reproducible:
1) post a message,
2) edit it and attach a large picture
3) visit the topic.

The problem is due to the fact that every time a topic with attachments is opened, SMF checks if the thumbnails are present and if not it tries to create a new one.

Two are the possible fixes:
1) avoid to attach anything unless the preview works;
2) avoid to (try to) generate the thumbnail while viewing the topic.

Related: http://www.simplemachines.org/community/index.php?topic=447796.0


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Chas Large

Posted this on the related topic just in case one or the other is answered first.

I appreciate this is an old topic but we have several members of our forum uploading large resolution images 3000+px x 3000+px and even though the file size is small 500KiB it blocks the topic.

Has anyone found a way to overcome this problem?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Arantor

A host that lets you change the memory limit would be handy.

What happens is, the system's trying to shrink the image, but to do that it has to unpack the image, which means 3000 x 3000 x 4 bytes per pixel = 36MB which is above most hosts' allowed memory limit.

Chas Large

Quote from: Arantor on March 14, 2013, 11:15:00 AM
A host that lets you change the memory limit would be handy.

What happens is, the system's trying to shrink the image, but to do that it has to unpack the image, which means 3000 x 3000 x 4 bytes per pixel = 36MB which is above most hosts' allowed memory limit.
Ahhh!, thanks for the explanation. I have some control over my hosting environment, I'll see if it allows me to change that.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Chas Large

#12
No, sadly I cannot change this value. [EDIT] Meant to say my memory limit is currently set to 32M, which should be enough for most large images I believe.

However, I have just been informed that the problem has been seen again but in an older topic that was posted in October 2011.

A large attachment was posted back then with a resolution of 1842 x 3075px (1.15MiB) [1842 x 3075 x 4 = 22.6MB] It worked OK back then and all the members who viewed that post back then could see the attachment with no trouble at all and should work within my 32M memory limit on the server.

So it would seem the problem was introduced sometime after this date?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Arantor

Well, it's slightly more complicated. JPEG typically rounds to 16 pixel boundaries, which means it's probably more likely to be 1856x3088x4 = 22.9MB. Then add the working overhead of PHP itself, could easily fill up the remaining space up to the 32MB barrier.

Vince S

People could I suggest this topic be "implemented" properly? What it seems has happened now is a trap has been put on posts preventing them going up with a .png or even a .pdf REGARDLESS OF SIZE. I have just tried several times to post with a small (50kB) .png or similar sized .pdf and the post never seems to get up and if I leave it for an hour or so there is still a blank screen staring at me. Finally a moderator edits the post and says attachment is removed due to (link to this topic) and would I please stop submitting it unless I zip it first.

Well stuff me finally I have a clue what is going on and post with a zipped attachment, saving all of 5kB! But the problem is I wasn't told. In my own smf forum when one attempts to attach a file the prompt box has some clear text which says what is acceptable, sizes, qtys, types - and if one goes outside that immediately there is an error generated and you know. Here there is no info and the moderator trap is poorly implemented, from the user's perspective anyway. And no doubt the moderator's also. Can this policy be implemented a bit better please? Thank you.

Edit: I will also add I am a bit astonished at the problem, it is not something I have encountered on shared hosting. I have deliberately set the auto-thumbnailer size to be quite large so people can see the attachments without having to download them, and also it saves people figuring how to insert them in the text. Sure if there are lots of big pictures the page can load a bit slowly, but usually not an issue. Here is a recently topical example that the "Viewed" count would suggest has meant people don't have issues getting the info: http://hunterdog.org.au/DiscussionBoard/index.php?topic=193.msg423#msg423

and here is an example of larger pics that still work well: http://hunterdog.org.au/DiscussionBoard/index.php?topic=890
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

Advertisement: