In many situations, PHP developer need to change the upload and post maximum size in LAMP Enviroment.
There are more than one way to extend the limitation.
1) modify php.ini
upload_max_filesize = 20M
post_max_size = 20M
There are obvious advantages/disadvantages about this way.
a) It is a system-wide setting b) It will not be effect until Apache is restarted
2) add and modify .htaccess file
a) Add content into the file
php_value upload_max_filesize 15M
php_value post_max_size 15M
b) change the privilege of the file
chmod 777 .htaccess
There are obvious advantages/disadvantages about this way.
a) It is not a system-wide setting, the .htaccess under DIR only take effection under DIR
b) It will be effect immediately, don’t need to restart Apache.