Upload Large File for Download Products in TomatoCart

Some TomatoCart community user’s blame it is always failed to upload the large file for the download product in the admin panel:

When I try to upload any of them to the product listing it never completes. When I click save and continue or submit the please wait box pops up and shows the loading progress bar but the file never uploads and the uploading status box just keeps showing progress. at first I though maybe it would take some time since all the zips are around 120mb in size but I have left it bee and it has been 16 hours now and it should have completed by now.

In fact, it is not caused by TomatoCart system. When you upload the large file, you have to adjust some php configurations. By default, PHP permits a maximum file upload of 2MB. You have to increase the limit when necessary. Two PHP configuration options control the maximum upload size: upload_max_filesize and post_max_size.

However, you also need to consider the time it takes to complete an upload. PHP scripts normally time-out after 30 seconds, but a 10MB file would take at least 3 minutes to upload on a healthy broadband connection (remember that upload speeds are typically five times slower than download speeds). In addition, manipulating or saving an uploaded image may also cause script time-outs. We therefore need to set PHP’s max_input_time and max_execution_time to something like 300 (5 minutes specified in seconds).

These four options can be set in your server’s php.ini configuration file so that they apply to all your applications. Generally, it’s impossible to modify the php.ini file as you are using the virtual host. Alternatively, if you’re using Apache, you can configure the settings in the admin > .htaccess file of TomatoCart installed directory on your web server:

php_value upload_max_filesize 10M
php_value post_max_size 12M
php_value max_input_time 300
php_value max_execution_time 300

I had modified the four options and tested the upload action of download product again. It is successful to upload the large file. You could adjust the values of the configurations depending on your own requirement. The post max size should be greater than upload_max_filesize because the uploaded file just one kind of data in the post request.

Looking for quality TomatoCart Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , | Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

Leave a Reply

Your email address will not be published. Required fields are marked *


7 + = 10

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>