Magento 1.9 – Can’t Upload Large CSV File

csvmagento-1.9varien-file-uploader

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?

Best Answer

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
Related Topic