The three files you have there are each meant for different uses.
/etc/php5/cli/php.ini is for the CLI PHP program, which you found by running php on the terminal.
/etc/php5/cgi/php.ini is for the php-cgi system which isn't specifically used in this setup.
/etc/php5/apache2/php.ini is for the PHP plugin used by Apache. This is the one you need to edit for changes to be applied for your Apache setup.
Es decir /etc/php5/apache2/php.ini es el bueno.
buscamos
upload_max_filesize = 2M
post_max_size = 2M
y le cambiamos el 2M por 100M (por ejemplo), guardamos y listo.
Pero puede ser que esto no nos funcione (como ha sido en uno de mis casos), asi que hacemos lo siguiente:
create a php file with <? phpinfo(); ?>
Look for "Scan this dir for additional .ini files".
Go to the above directory and create user.ini file like:-
post_max_size = 40M
upload_max_filesize = 40M
Restart Apache sudo service apache2 restart
Reload the phpinfo(); file. You will thanks me
