XF 1.4 Cannot upload avatars or images

Radiola

Member
I've read through some of the threads on this but I haven't quite figured this one out.

We've had 1.4 running for about 6 months since conversion. We have never had avatar or image upload problems before. Then about a week ago we've run into the situation where every time someone tries it tells people that the "image is too large".

We have checked with the server and we are no where near maxing out with our usage. In fact the CPU shows hardly any use at all. The problem does not seem to be with the server.


So, in admin panel I changed the size of the image that people can upload to a max size, like 100,000. No change.

I have read that maybe I need to change something in the php.ini file and if I knew where to find that I could do that. (Haven't looked for a couple of days-way too busy giving midterms).

So I need to figure out what the problem is and what I can do to avoid the problem in the future (and if this needs to be merged with some other previous thread that's fine with me).
 
There are settings in nginx config that will also control some factors of uploads (if you are using nginx). As you found, there are also settings in the php.ini that control upload sizes.

These are your typical php.ini ones you need to edit
Code:
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize =
Code:
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size =
Code:
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize =
 
@Tracy Perry , where do I find the php.ini file? I can't find it.
Depends on whether you are on shared hosting or VPS/Dedi system. If on a VPS/Dedi, just log in and issue an updatedb and then locate php.ini.
or you can always go to your ACP and pull up the php info page. It will tell you where the php.ini that is in use is located.

This is what mine on my older server shows
Screen Shot 2015-06-21 at 5.55.57 PM.webp
 
upload_max_filesize would generally be the main one, but post_max_size is also relevant. You should find the existing lines and you'll likely want to change the values.
 
These are the values I put in:

upload_max_filesize = 100M
post_max_size = 105M
max_execution_time = 500
Man_input_time = 500
memory_limit = 128M
That's based on recommendations from here and from our host.

@ Brogan, none of the files (images) that people have loaded are very large and we've asked people to only use .jpg and not .tiff etc. Most of the images are fake documents from scammers, photos of scammers, or photos used by scammers. antifraudintl.org. As I say, we haven't had any problem with Xf until a couple of weeks ago.
 
I added a line based on another thread I read and my values now are:
upload_max_filesize = 100M
post_max_size = 105M
max_file_uploads = 20
max_execution_time = 500
Man_input_time = 500
memory_limit = 128M
But I wonder if those are good (correct) values or if I really need to upload max file size to 200 or something?
 
Are those sections of your XenForo install? In terms of a test user, ideally we'd just need access to be able to upload an attachment (or avatar). You can protect access to those areas.

FTP would really just be to get more details about the error that isn't exposed in the UI.
 
Yes, all part of the install. I started a ticket Mike, and there's a user ID to login with there. It worked all right for me. I'll see what others think about the ftp thing and see if there's some way to work that out.
 
Back
Top Bottom