this is my file upload code when i try to upload file which has size more than 75mb i can't upload file i did't get any error i also change php.ini file still its not working
$uploader = new Varien_File_Uploader('csvupload');
 $uploader->setAllowedExtensions(array('csv'));
 $uploader->setAllowRenameFiles(false);
 $uploader->setFilesDispersion(false);
 $path = Mage::getBaseDir('media') . DS . 'uploads';
 $fname="customer.csv";
 $uploader->save($path, $fname );
 $filename = $uploader->getUploadedFileName();
can anybody give solution?
2 Answers 2
It's not Magento but PHP/server settings that are the issue. By default PHP has a much smaller max file and post size.
Check out this article on uploading large files. Via your htaccess you can change these values. Also make sure the execution_time is high enough to process the file
php_value upload_max_filesize 80M
php_value post_max_size 80M
php_value max_input_time 300
php_value max_execution_time 300
- 
 i tried your answer but can't solve it...another solution?mit patel– mit patel2015年08月18日 07:15:05 +00:00Commented Aug 18, 2015 at 7:15
- 
 It might be limited by yourphp.ini, or the hosting provider. I would advice contacting them directly to ask if increasing the size is possibleSander Mangel– Sander Mangel2015年08月18日 08:31:18 +00:00Commented Aug 18, 2015 at 8:31
- 
 i also edit php.ini file still its not work and i am working on localhostmit patel– mit patel2015年08月18日 08:33:57 +00:00Commented Aug 18, 2015 at 8:33
- 
 did you restart the server locally? (obvious question but still)Sander Mangel– Sander Mangel2015年08月18日 09:14:06 +00:00Commented Aug 18, 2015 at 9:14
- 
 i just forgot to do this now its working...thank you...mit patel– mit patel2015年08月18日 10:16:51 +00:00Commented Aug 18, 2015 at 10:16
- Create phpinfo.php file in root. add following code. and run it from browser. 
Please check value of upload_max_file_size.
- Remove comment of - ini_set('display_errors', 1);from index.php. Now test your code. It will show error.
- Enable log from admin panel and check log file. 
Explore related questions
See similar questions with these tags.