Product large file downloads NOT working

  • Posts: 6
  • Thank you received: 1
11 years 9 months ago #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...

        // 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: 11 years 9 months ago by iliep.
The following user(s) said Thank You: Xavier

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum