在codeigniter IIS7中上传500 MB的文件

I'm trying to upload a 500 MB file in codeigniter. My website is hosted on IIS7. I have already increased maxAllowedContentLength in my web.config file. I have also increased upload_max_filesize and post_max_size in php.ini

When I try to upload a file less than 10 MB then its working fine but when I try to upload a file size more than 100 MB then its not working fine here is my code

if( ! empty($_FILES['filename']['name'])){ do some action } else{ do other things }

html form `

                    <div class="par control-group">
                        <label class="control-label" for="firstname">Upload New CSV</label>
                        <div class="controls"><input type="file" name="filename" id="filename" class="required input-large" style="width: 50%;"></div>
                    </div>  

                    <input name="umar" type="hidden" value="1">                     
                    <p class="stdformbutton">
                        <button class="btn btn-primary">Save</button>
                    </p>
                </form>`

when file is less than 10 MB then if part run but when I try to upload a file more than 100 MB then else part is running. Don't know why. I have checked input file value buts its empty.

follow this url CodeIgniter Uploading Large Files

or use below code.

Below code use in your php file.

ini_set( 'memory_limit', '500M' );
ini_set('upload_max_filesize', '500M');  
ini_set('post_max_size', '500M');  
ini_set('max_input_time', 3600);  
ini_set('max_execution_time', 3600);

set below code in .htaccess file if you use IIs server the then change Web.config file.

see below url for web.conifg file

http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/translate-htaccess-content-to-iis-webconfig

php_value upload_max_filesize 500M  
php_value post_max_size 500M  
php_value max_input_time 3600  
php_value max_execution_time 3600

Edit my answer after you comment

Update answer

Set config parameter in your stage1 function.

$config['max_size'] = '1000000';
$config['max_width']  = '1024000';
$config['max_height']  = '768000';

After then try it.