[Skip to main content](#vessel-content)

#   Product large file downloads NOT working

##

- **[iliep](/forum/user/6812-iliep "View iliep's Profile")**
- [![iliep's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6812-iliep "View iliep's Profile") Topic Author
- [ Offline](/forum/user/6812-iliep)

Less More

- Posts: 6
- Thank you received: 1
-
-

13 years 9 months ago -  13 years 9 months ago [\#87930](#87930) by [iliep](/forum/user/6812-iliep "View iliep's Profile")  *[Product large file downloads NOT working](/forum/3-bug-report/77908-product-large-file-downloads-not-working#87930 "Hello,  We have a store where the product is a file around 250MB.  The download would always fail at 53MB.  After some investigation and digging around it seems like the output buffering was enabled before sending the file, and when that buffer get's full the script would fail.  I do not have direct confirmation of this, however adding this code in the sendFile() function solved the problem...  The file in questions is:  administrator/components/com&#95;hikashop/classes/file.php  The above code was added right before the loop that is sending the file bit by bit. The purpose of this fix is to disable the output buffering completely so that there will be no memory issues.  Now the large downloads work fine...")* was created by *[iliep](/forum/user/6812-iliep "View iliep's Profile")*

Hello,

We have a store where the product is a file around 250MB.

The download would always fail at 53MB.

After some investigation and digging around it seems like the output buffering was enabled before sending the file, and when that buffer get's full the script would fail.

I do not have direct confirmation of this, however adding this code in the sendFile() function solved the problem...
Code:

// make sure output buffering is OFF!!! while (ob_get_level()) { ob_end_flush(); }

The file in questions is:

administrator/components/com_hikashop/classes/file.php

The above code was added right before the loop that is sending the file bit by bit. The purpose of this fix is to disable the output buffering completely so that there will be no memory issues.

Now the large downloads work fine...

Last edit: 13 years 9 months ago by [iliep](/forum/user/6812-iliep "View iliep's Profile").

The following user(s) said Thank You: [Xavier](/forum/user/4105-xavier "View Xavier's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzkwOC1wcm9kdWN0LWxhcmdlLWZpbGUtZG93bmxvYWRzLW5vdC13b3JraW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
