News:

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

Main Menu

Re: Uploading a large image attachment using SMF fails

Started by lazylivin, April 17, 2015, 12:19:19 AM

Previous topic - Next topic

lazylivin

Quote from: Arantor on January 13, 2015, 10:57:44 PM
As suspected, that's a very large image, larger than SMF was ever designed to deal with. It's failing when it tries to make the thumbnail image for it.

You can try changing the memory limit during the thumbnail generation stage - changing Sources/Subs-Graphics.php
Code (find) Select
@ini_set('memory_limit', '90M');

Code (replace) Select
@ini_set('memory_limit', '384M');

That should be enough for the image described. It is a huge image.

I have same issue. With 4-5MB images it goes to a white screen. I tried making it 384M, 768M and then as high as 1536. Unfortuntley didn't have the luck the OP did. Both forums I manage have same issue. I can replicate the problem with a fresh install of 3.09. Hoping you may have another idea up your sleeve for me to try out

lazylivin

Just bumping to hopefully get some help. I have two forums both with same issue uploading pictures. When clicking post it goes to a white screen and never creates the post. Sometime it gives this message

Your attachment couldn't be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.
Please consult your server administrator for more information.

Kindred

it is almost certainly a HOST side problem....   especially, if you get a white-screen...   you should check with your host.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

lazylivin

I just did some more troubleshooting and it only occurs when having this selected in Attachments Settings "Resize images when showing under posts"
This makes the image smaller to fit the forum width which is important setting otherwise pictures show their actual size making them not viewable.

lazylivin

If I uncheck that setting it uploads fine. When I check that setting even posts that already uploaded fine no longer open.

Kindred

Which matches what Arantor said...   the resize script is unable to handle such large files on your server.

As I suggested, contact your host.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

lazylivin

Can you tell me how contacting my host can help. What am I asking them for?

Night09

Quote from: lazylivin on April 19, 2015, 12:04:37 PM
Can you tell me how contacting my host can help. What am I asking them for?

Your host script execution time limit may be causing time outs. It may be set to 30 seconds and needs changing to 60 or more depending. If the file hasnt finished in the time allowed it will fail and time out.

lazylivin

Quote from: Night09 on April 19, 2015, 10:19:38 PM
Quote from: lazylivin on April 19, 2015, 12:04:37 PM
Can you tell me how contacting my host can help. What am I asking them for?

Your host script execution time limit may be causing time outs. It may be set to 30 seconds and needs changing to 60 or more depending. If the file hasn't finished in the time allowed it will fail and time out.

I timed it and it is only taking about 11 seconds to upload the file then it goes to either the white screen or gives me this message.

Your attachment couldn't be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.

Please consult your server administrator for more information.


I think their is something wrong with SMF. I did a fresh load. Just SMF and have the same issue. No customization. Unchecking the box ""Resize images when showing under posts" it fixes all issues but the image is much to large to properly format the screen.

Kindred

Did you even bother to READ the error message.

...than the server will allow.


Please consult your server administrator...

why does everyone feel that they need to argue when we give a suggestion?

TALK TO YOUR HOST!
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

lazylivin

I contact my host "1and1". They told me I should upgrade domain robertsriders.com from their basic package to their performance package to fix the issue and also recommending deleting images and videos. They said the upgrade will take me from 60MB to 99MB php memory limit. However I have the same issue on WORCREEF.org which already is on their performance pacakage at 99MB php memory limit.

I ran another test. Changed the file in forum root "mem.php" from <100 to <50. This fixed the issue or at least made it better on robertsriders.com. I assume this can confirm that it is a memory related issue. However changing it on worcreef.org it did not fix the issue. Perhaps their is more then one thing going on.

margarett

Typical reply of an overseller host... Upgrade packages, pay more. Yay!

Suggestion: find yourself a non oversold host. Check our Hosting boards for good ideas --> http://www.simplemachines.org/community/index.php?board=4.0
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: