• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 There was a problem uploading your file.

Brandon Sheley

Well-known member
#1
I'm working on a site that will have large images straight from a camera uploaded.. or at least that is the plan.
This is xenforo: 1.5, this also happens in the post attachment as well. Maybe the thread should be moved somewhere else?

problem.png

This is what I've done so far.

mod_security is disabled
post_max_size - 200M
max_execution_time - 300
upload_max_filesize - 200M

options.png

This is with godaddy hosting on a shared account if that matters.
I'm open to suggestions, I've been tinkering with this a few hours now.

Thanks
 

Brandon Sheley

Well-known member
#5
Thanks

Also I forgot a few things I've tried.
I disabled the flash uploaded and no changes, I didn't get the message above, the screen just keep spinning.

I've also tried adding this to the .htaccess in the root to disable mod_security (which GD says wasn't enabled)

Code:
<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off
</IfModule>
I've also added this to the config file

Code:
$config['maxImageResizePixelCount'] = 20000000;
Thanks again for the help, I hope it's just something simple I've looked over. :)
 

Chris D

XenForo developer
Staff member
#7
It isn't that, no.

The cause seems to be some sort of server side timeout - the process fails with a 504 gateway error.
 

Snog

Well-known member
#9
You might want to check the PHP memory limit.

In general, here's the rule of thumb for php memory settings

memory_limit should be greater than post_max_size
post_max_size should be greater than upload_max_filesize

The reason for that rule of thumb is pretty obvious. Memory limit includes everything for the current process, including data. Post_max_size includes anything being posted with a message, upload, etc., including the file(s) being uploaded.
 

Chris D

XenForo developer
Staff member
#10
@Floyd R Turbo was having trouble, also on a GoDaddy server @Brandon Sheley

In WHM -> Tweak -> PHP changed

cPanel PHP max execution time from 90 to 360s
cPanel PHP max POST size from 55 to 200mb
cPanel PHP max upload size from 50 to 200mb
Indeed memory limit would be worth increasing, too.

Interestingly, it wasn't changing these settings that worked, but apparently php.ini had some values - including post_max_size which were changed, and this fixed it. I appreciate you've already done that, but it might be worth checking WHM/cPanel to see if raising any of these values help.
 

andybond

Active member
#11
in Cpanel there is an option for the file size upload. Its found under PHP settings in my CPanel + Host. Default is around 4mb . This sorted the very issue detailed here out for me.
 

Brandon Sheley

Well-known member
#12
You might want to check the PHP memory limit.

In general, here's the rule of thumb for php memory settings

memory_limit should be greater than post_max_size
post_max_size should be greater than upload_max_filesize

The reason for that rule of thumb is pretty obvious. Memory limit includes everything for the current process, including data. Post_max_size includes anything being posted with a message, upload, etc., including the file(s) being uploaded.
memory_limit - 128M
post_max_size - 200M
upload_max_filesize - 200M
max_execution_time - 300

The image we're trying to upload as a test is about 10MB

The above settings shouldn't have any problem with the images IMO.

We're on the hunt for better hosting ATM.. Thanks again everyone, thanks Chris for debugging and finding the gateway error.
 
Last edited: