February 25, 2012

Big files are not uploading in IE?

Big files are not uploading in IE?

If you are facing the following problems:

  • Images/Files are uploading but not being written on disk, when you check through ftp so files are not found on expected location
  • Files are uploading when you check your module on Firefox but doesn’t work when check in IE8 or even in IE9
  • Files are uploading when you check your module on Google chrome but doesn’t work when check in Internet explorer 8 or even in Internet explorer 9
  • Although you have tried Alternative PHP Cache (APC) but still you couldn’t find the problem that why files are not uploading
  • And you have tried the files with various sizes

Please confirm that whenever you try to upload from IE so it does not upload even 2MB but when you try to upload from Google chrome and/or Firefox so files are uploading successfully. If so, then,

Try this:

This will change local value, not the master value but you can increase the upload/post limit by putting these lines in .htaccess (Download)

  1. php_value upload_max_filesize 80M
  2. php_value post_max_size 80M

Important: 80M is an example, change this value whatever is your requirement for the project. The importance of .htaccess is more than PHP pages where we can set ini_set for the same thing.The reason is “.htaccess file accessed every time you request a page from server” but it being accessed before your script files. Recommended method is to change values from httpd.conf but its not so easy and safe to play with it every time. So instead of taking risk with httpd.conf and also trying ini_set in scripting files .htaccess is feasible if you are sure you are not looking for an extra ordinary performance of the server because .htaccess not the ultimate and efficient solution and your application is most demanding and a large no. of users continuously using it. Every file will be checked through .htaccess according to the conditions written in it and then request will be fulfilled. Anyways, you can observe better and tradeoff among the things you have at that situation.

Don’t hesitate to ask me if you are stuck somewhere, i will try my best to come up with a solution.

Thanks,
Fahad

Last updated: March 19, 2014