Large attachment (9MB) not working


Well-known member
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:

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
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:




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

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

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 :-(


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


XenForo moderator
Staff member
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 ;)


XenForo moderator
Staff member
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.



Well-known member
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 :)