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

Large attachment (9MB) not working

SchmitzIT

Well-known member
#1
On a forum I seem to be experiencing some difficulties with a particularly large attachment. I set the options to allow for 25 MB, and can successfully upload multiple other files, but this particular one keeps being rejected.

I tried both flash as well as regular uploading, but neither work, and neither provide an error message, other than the Flash one stating:

There was a problem uploading your file.
My config file contains the following:

Code:
ini_set('max_execution_time', 1000);
ini_set('memory_limit', -1); // Disable the maximum memory size
I also tried setting display_errors to true, but no extra info is available with that.

Is there a config-file alternative for the PHP setting upload_max_filesize? Any other ideas?


Thanks :)
 

Jake Bunce

XenForo moderator
Staff member
#4
That's the generic attachment error. Doesn't indicate what went wrong. But probably a server limit was exceeded. Here are some server settings that may be limiting:

PHP:
max_execution_time
memory_limit
post_max_size
upload_max_filesize

MySQL:
max_allowed_packet
max_packet_size
wait_timeout
 

SchmitzIT

Well-known member
#5
Here's my settings from php.ini:

PHP:
max_execution_time = 300 seconds -- increased from 60
max_input_time= 300 -- increased from 60
memory limit = 128 M
post_max_size = 25M -- increased from 8
upload_max_filesize = 25M

MySQL:
max_allowed_packet = 25M -- increased from 4
wait_timeout = 300 (line was not in there before).

Assing max_packet_size = 25M causes mySQL to not start.

So far none of these changes managed to make a difference :-(
 

Deebs

Well-known member
#6
Are you using PHP-FPM/nginx? There will be some settings there as well... (if yes, I go look mine up)
 

Slavik

XenForo moderator
Staff member
#10
Ugh. I figured it out. The website was not using the global php.ini file, but rather a local one.The site I usually deal with does use the global one, hence my confusion.

I increased the max_post_size in the local file.

Using some sort of management panel I assume ;)
 

Slavik

XenForo moderator
Staff member
#12
Plesk, yeah. The weird thing is that I never had issues with the other site. Oh well, learnt something new :)
Oh yes, all latest versions of plesk put individual php.ini settings in the /var/www/vhosts/*name/etc/ folder

You can also alter them from the panel, open up the domain > customise > php settings management.

:)
 

SchmitzIT

Well-known member
#13
Nice. That explains a few things then. The other domain has been on the server since we got it, so probably using an old version of Plesk.

Good to know for future reference :)