Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

13 Meg Download Limit?


Guest

Recommended Posts

::sigh:: Just when I thought I had everything working great... For some reason when people buy downloadable products it cuts the file off at 13 megs. Anybody know what's up with that? Is there a setting somewhere for a max download amount?

Link to comment
Share on other sites

This will be a limit set by your hosting company in php.ini.? Actually 13Mbs is quite high for a shared server.

 

Vger

 

My hosting company insists that this is not an issue with the server, and that they tested the store and were able to download the entire file. I can't however, from multiple computers. Is there anything else that could be causing this problem?

Link to comment
Share on other sites

Try setting

 

Administration->Configuration->Download->Download by redirect

 

to true.

 

It might work....

 

Tom

 

It's already is set to redirect. I'm running on a windows server so it wouldn't even work it it was set to false.

Link to comment
Share on other sites

From what I have read, the maximum execution time of a PHP script (default 30 s) might also be the culprit.

 

I'm not sure that's the case. It seems to be happening at 13 megs each time. If it were 30 seconds then it would be a different file size each time before it cuts out. On a side note, is there a way to offer multiple files on one purchase as a workaround?

Link to comment
Share on other sites

My hosting company insists that this is not an issue with the server

 

I don't know of any hosting company offering people websites on shared servers who do not put a limit on the size of downloads allowed, either via php.ini or in httpd conf. I think your hosting company are telling you whoppers!

 

Vger

Link to comment
Share on other sites

  • 1 month later...

The problem is a memory limit with PHP in your host server. By default, PHP script memory is 8MB, which is not enough for downloads > 3MB

 

Try getting a copy of your host's php.ini file, then put a copy of it in the OsCommerce catalog/ folder, and change the setting:

 

memory_limit = 8M    ; Maximum amount of memory a script may consume (8MB)

 

to something like

memory_limit = 20M    ; Maximum amount of memory a script may consume (8MB).

 

You might want to contact your host company because this will take considerable resources. You will want to change the last part of your download.php file from

 

readfile(DIR_FS_DOWNLOAD . $downloads['orders_products_filename']);

 

to

 

$fp = fopen(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'],'r');
while(!feof($fp)) {
   $buffer = fread($fp, 4096);
print $buffer;
}
fclose($fp);

 

 

to prevent using too many resources and your host company getting pissed off at you. :P

 

Hope this helps!

~Jorge

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...