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

What are your settings for "upload_max_filesize" "post_max_size" "memory_limit" ?

RoldanLT

Well-known member
#1
Here's mine:
upload_max_filesize = 32M
post_max_size = 32M
memory_limit = 512M

(All declared/override on /libary/config.php)
php.ini are all default from CentminMod :)

My Forum Stat's:
Discussions:41,609
Messages:410,816
Members:144,491
 

Floren

Well-known member
#2
You are allowing users to upload 32MB attachments, or POST requests up to 32MB. That is a security risk, as someone malicious could easily exhaust your servers resources by posting simultaneous large posts. The easiest way to calculate the proper POST size is by making a sum of of your max allowed attachment size (i.e. 1MB) and the number of characters allowed in a post (i.e. 10,000 = 10KB). Setting a value of 1MB is more than enough for post_max_size. I personally use these values into PHP-FPM pool assigned to forums:
Code:
php_admin_value[memory_limit] = 256M
php_admin_value[post_max_size] = 1M
php_admin_value[upload_max_filesize] = 1M
You have to define those values into your Nginx configuration also, PHP is not enough.