With all the new web apps popping up, the demand for the exchange of media such as high res photos and music clips are becoming more prominent. To accomplish this, we need to tell our webserver/PHP to allow larger than conventional upload file sizes. Traditionally, the max upload size is around 2mb, anything more will yield an error 500 due to a timeout. There are two ways (that I know of) to change the php upload limit.
The first is done by editing the php.ini file. This is normally the case if you have your own dedicated or virtual server. There may be multiple php.ini files throughout your system. The main one is typically found in /etc/php.ini which would govern all PHP scripts. Furthermore you can include php.ini file in each folder that you wish to apply different settings to. In any case the, below are the fields you want to change.
upload_max_filesize = 10M ; post_max_size = 20M ;
An alternative is to using the php.ini file is to use .htaccess. By just placing a.htaccess file in your root folder, all folders beneath it will also have the change. The code to change your PHP max file upload size is as follows:
RewriteEngine On php_value post_max_size 20M php_value upload_max_filesize 10M php_value max_execution_time 6000000
Notes: Choose your values carefully, know your audience and monitor the number of users. Always test/plan for worst case scenarios; 500 users uploading 10mb at the same time = 5,000mb bandwidth. This could easily annoy your web host provider.