hondo2160 Posted May 23, 2006 Posted May 23, 2006 I recently set up a webstore, offering a downloadable ZIP file of my music (50 MB). At around 9.xx MB, the file stops downloading. I attempted the 'chunk file' method by altering the download.php file as follows with no luck: // Now send the file with header() magic header("Expires: Mon, 26 Nov 1962 00:00:00 GMT"); header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); header("Content-Type: Application/octet-stream"); header("Content-disposition: attachment; filename=" . $downloads['orders_products_filename']); if (DOWNLOAD_BY_REDIRECT == 'true') { // This will work only on Unix/Linux hosts tep_unlink_temp_dir(DIR_FS_DOWNLOAD_PUBLIC); $tempdir = tep_random_name(); umask(0000); mkdir(DIR_FS_DOWNLOAD_PUBLIC . $tempdir, 0777); symlink(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'], DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename']); tep_redirect(DIR_WS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename']); } else { // This will work on all systems, but will need considerable resources // We could also loop with fread($fp, 4096) to save memory $file = DIR_FS_DOWNLOAD . $downloads['orders_products_filename']; $chunksize = 1*(1024*1024); // 1MB chunk $buffer = ''; $handle = fopen($file, 'rb'); if ($handle !== false) { while (!feof($handle)) { $buffer = fread($handle, $chunksize); print $buffer; } fclose($handle); } } ?> Any other suggestions? I have been up and down the board and tried every solution to no avail. I know there are many different solutions posted to solve this...but none of them have worked for me. Thanks! Jason
videobus Posted May 24, 2006 Posted May 24, 2006 I have same problem uploading large file. I called my ISP (www.1and1.com) and they said the session timed out since there was no activity (mouse click, page movement, etc.). It appears data transfer is not considered activity !!!!! Stupid ISP's!!! They suggested that I turn off the popup blocker (I use Google toolbar). They said they write a session ID on my machine (?). I turned off my pop-up blocker and it didn't timeout again. Still doesn't make any sense to me.
hondo2160 Posted May 24, 2006 Author Posted May 24, 2006 Well, this isn't a timeout issue, as it is the same on any user's system...it appears to be a filesize issue. Any help?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.