Php.ini upload max filesize limit too low!

php7
bugs

#1

Ubuntu 16.04 Size limit 2M is too small for some .torrents

upload_max_filesize = 8M

Modified /etc/php/7.0/apache2/php.ini

old value

upload_max_filesize = 2M

Reported by a user from the Bitch Squad


#2

I second this; we should have it increased

(i have hit this with a 33gb torrent with the wrong piece count)


#3

I think I see what’s happening here. My sed is not working :stuck_out_tongue:

sed -i.bak -e "s/post_max_size = 8M/post_max_size = 64M/" \
               -e "s/upload_max_filesize = 2M/upload_max_filesize = 92M/" \
               -e "s/expose_php = On/expose_php = Off/" \
               -e "s/128M/768M/" \
               -e "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" \
               -e "s/;opcache.enable=0/opcache.enable=1/" \
               -e "s/;opcache.memory_consumption=64/opcache.memory_consumption=128/" \
               -e "s/;opcache.max_accelerated_files=2000/opcache.max_accelerated_files=4000/" \
               -e "s/;opcache.revalidate_freq=2/opcache.revalidate_freq=240/" /etc/php/7.0/fpm/php.ini

#4

I actually stand corrected.

@T4K, which php.ini location are you reviewing?

It is modified in /etc/php/7.0/fpm/ . Is your system not utilizing the fpm ini?


#5

No it’s not. It’s using /etc/php/7.0/apache2/php.ini


#6

Alright, I will need to investigate why with fpm in the arrangement it is not utilizing it.

I have added this to the list and will push the fix tomorrow:

sed -i.bak -e "s/post_max_size = 8M/post_max_size = 64M/" \
           -e "s/upload_max_filesize = 2M/upload_max_filesize = 92M/" \
           -e "s/expose_php = On/expose_php = Off/" \
           -e "s/128M/768M/" \
           -e "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" \
           -e "s/;opcache.enable=0/opcache.enable=1/" \
           -e "s/;opcache.memory_consumption=64/opcache.memory_consumption=128/" \
           -e "s/;opcache.max_accelerated_files=2000/opcache.max_accelerated_files=4000/" \
           -e "s/;opcache.revalidate_freq=2/opcache.revalidate_freq=240/" /etc/php/7.0/apache2/php.ini