Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 282010

Change the PHP's maximum upload file size


The default maximum upload file size in PHP is only 2MB. If you want to change it, you need to edit the php.ini

vi /etc/php.ini

Locate and set (100M in the following example)

memory_limit = 100M;
post_max_size = 100M;
upload_max_filesize = 100M;

Try it with the number you need. (You might need to use a large value in post_max_size and memory_limit if you want to upload a file which is exactly 100M in size)

Also, remember to restart web server such as Apache if needed.

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>