News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Cannot upload large images

Started by Pyrhel, February 04, 2017, 11:22:16 AM

Previous topic - Next topic

Pyrhel

Hello everyone. I need a tip or hint for my problem - when trying to upload single image, larger than 10MB or several smaller images, which global size is larger than 10MB I don't have an on-page error or something in the php log files, and the forum opens an empty "new topic" page when the size is reached. Otherwise everything works ok - I can upload large files (e.g. 8MB and the forum resizes them), many smaller files (e.g. 10 x 0.5MB), etc.
The forum is configured to limit the size of the single attachment up to 15MB, everything else is "0" - no limit. PHP is configured to accept files up to 128MB. Tried to disable the resize/re-encode features and nothing changed. There are no errors in the php log file.
Any ideas?

Illori

0 really is not a good limit to use, put a valid number in its place and test it out and see if it helps any.

Pyrhel

Tested before posting, still the same result :(

Jailer

Check with your host to see if they have a limit set in their server config.

Chen Zhen

Within your php.ini file memory_limit, upload_max_filesize & post_max_size should perhaps be set higher to allow larger file attachments.
Remember to only use M (no space between the amount & the M) in those settings to represent Megabytes.
https://mediatemple.net/community/products/dv/204404784/how-do-i-increase-the-php-upload-limits




Also adjust the attachment settings of your SMF admin although it may ignore them.

Check to make sure the php settings are correct after you adjust and reset the server.
http://php.net/manual/en/function.phpinfo.php

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Pyrhel

Guys, you're great! The problem was in the post_max_size parameter of my hosting, they had it set to 8MB :)

Pyrhel

For the people, who are facing the same or similar (white screen of death) problem - if you want to upload pictures, larger than ~9MB, you'll have to edit the /Sources/Subs-Graphics.php. Find "@ini_set('memory_limit'" in it and set more memory there. I put there 256MB which is equals to my php's memory_limit.

Advertisement: