XF 1.5 "The uploaded file is too large for the server to process."

I am getting the following error when I try to upload an image: "The uploaded file is too large for the server to process."

The image is very small (around 60kb) and definitely below the maximum allowed image size. I randomly got this message for the first time and knew something was wrong. I even deleted an image in that post and then tried to re-upload the same exact file, and I got the error message again.

We're supposed to make a big announcement today, and we want to upload images, so it would be great if we could resolve this issue. Any help is appreciated. Thank you.
 

Brogan

XenForo moderator
Staff member
Have uploads ever worked?

If so, that could indicate an issue on the server, such as the tmp directory being full.
 
Uploads have worked for years, yes. I just tried again, and the issue was resolved without me doing anything. I think you're right that the tmp directory was full. Thank you for the fast response.
 

ElgrandOC

Member
I have been having this problem for a number of weeks and read all the replies, couldn't figure it out.

I eventually found that I am able to set my own extensions and parameters for my php version. I went into the php options and increased "the upload_max_filesize" to 4mb from 2mb. It would appear that as cameras get better and take increasingly larger files, this will need to be increased to allow for the larger file sizes.
I have set the max dimensions in the Attachment Settings to be 800x800 which resizes images back down to approx 100kb to 150kb to reduce space taken on the server. But I believe that increasing the limit will increase bandwidth usage if this is something that you need to monitor.
 

Brogan

XenForo moderator
Staff member
You should be able to increase the PHP setting to much higher than that, and it may be better to do so, to prevent members receiving upload errors due to PHP settings.

XF will automatically resize based on the settings in the ACP, so you can still limit the overall file size and dimensions.
 

maethlin

Member
Thanks for posting this @ElgrandOC - was very useful to me. For posterity (and anyone else looking in the future), my Xenforo settings were fine. It was the php.ini that needed changing. For my ubuntu host, it was as simple as changing /etc/php/7.0/apache2/php.ini and bumping upload_max_filesize from 2mb to 4mb. Your own file location may differ.

I have been having this problem for a number of weeks and read all the replies, couldn't figure it out.

I eventually found that I am able to set my own extensions and parameters for my php version. I went into the php options and increased "the upload_max_filesize" to 4mb from 2mb. It would appear that as cameras get better and take increasingly larger files, this will need to be increased to allow for the larger file sizes.
I have set the max dimensions in the Attachment Settings to be 800x800 which resizes images back down to approx 100kb to 150kb to reduce space taken on the server. But I believe that increasing the limit will increase bandwidth usage if this is something that you need to monitor.
 
Top