Configuring php.ini for upload

Well – sometimes you need to upload files bigger then the default 2M.

In php, you have to tweak the php.ini to get this done. The first parameter is upload_max_filesize. This one is usually 2M, and set the lower limit (at this point). However, changing this will not give you the option for, let say 100M. for that to happen, you’ll need yet another parameter. You see, the upload size is one thing, which is part of another thing – the maximum post size, or in php.ini lingo – post_max_size. This one default to 8M, so if you change the first to anything bigger then 8M, you will still have a limit of 8M.

You should probably set the post maximum to a higher value then the upload limit, php does this for a reason, which is that files can be a part from a bigger form with additional data/ files.

Yet another point to remember: you might want to check the memory limit option, in case your site is under a lot of memory intensive actions.