by default PHP will not handle file uploads larger than 2MB, if one requires PHP to handle larger files then one must set upload_max_filesize and post_max_size in your php.ini file to be larger than 2MB.
what alternative if one uses a shared hosting service with no access to php.ini ?
File uploads are handled before the script starts running so setting parameters with ini_set() will not work. All serious providers offer a way to customize your PHP settings. The exact mechanism should be explained in their help system and it depends on the server API:
If PHP runs as Apache module, you can use the
php_valueandphp_flagdirectives in an.htaccessfile.If PHP runs as CGI (or FastCGI), you should have a custom
php.inifile somewhere in your account.Some of the settings you may need to change are (.htaccess version):