Increase file upload maximum size in PHP

Networks are such a stack relying on many many things working together to get the end result you’re after.

To increase the maximum size of a form uploaded file in PHP you need to increase both the upload_max_filesize AND the post_max_size. The post_max_size isn’t always the most obvious, but comes into play when the file gets sent to upload via a form (HTTP POST)


/etc/php/php.ini post_max_size to big enough or set to zero (0) for unlimited

post_max_size = 0

/etc/php/php.ini upload_max_filesize to big enough

upload_max_filesize = 100M


Codemonkey of Node.js, Django, PHP and all things HTML5 Solving tech challenges, one bit at a time.

Posted in apache, linux Tagged with: , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *