Technical Blog Of JackCHAN

July 7, 2010

How to change the upload and post maximum size in LAMP Enviroment

Filed under: apache, linux — Tags: , — kaisechen @ 5:06 am

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.

1 Comment »

  1. […] How to change the upload and post maximum size in LAMP Enviroment … […]

    Pingback by What do you think of that Meijer new Blue Reuse shopping bag? | Go Shopping — July 10, 2010 @ 6:12 am


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.