Zen Cart Logo
Forums / General Questions / Downloads corrupted? v1.3.6

Downloads corrupted? v1.3.6

Locked

Views: 3,161

Results 21 to 27 of 27
This thread is locked. New replies are disabled.
26 May 2008, 3:44 PM
#21
backstage avatar

backstage

Zen Follower

Join Date:
Jan 2006
Posts:
108
Plugin Contributions:
0

Downloads corrupted? v1.3.6

Sorry.... it was me. Must have been tired

I have tried the patch for 1.3.7, but when I try to click on the download link, an empty page appear :(

Very big problem I have here :(, but thanks for all your time :)

Best Regards :)

27 May 2008, 12:20 AM
#22
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Downloads corrupted? v1.3.6

Blank pages are often a result of a PHP error or a conflict between code versions.
A tool to help you diagnose such errors can be seen here:
https://www.zen-cart.com/tutorials/index.php?article=82 - esp step 2a

31 May 2008, 3:22 PM
#23
backstage avatar

backstage

Zen Follower

Join Date:
Jan 2006
Posts:
108
Plugin Contributions:
0

Re: Downloads corrupted? v1.3.6

Have tried that now, and it show some warnings and so on at front pages. But when clicking download no error messages at all apears. Just an empty white page while trying to reach this link:
http://www.domain.com/index.php?main_page=download&order=146&id=84

Hope you still have the time and ideas of what to do :)

Thank you so much for you time

Kind Regards :)

31 May 2008, 3:34 PM
#24
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Downloads corrupted? v1.3.6

Nothing shows in the logs when you get that blank page?

3 Jun 2008, 6:51 PM
#25
backstage avatar

backstage

Zen Follower

Join Date:
Jan 2006
Posts:
108
Plugin Contributions:
0

Re: Downloads corrupted? v1.3.6

No only a blank page as if it cant find the link

4 Jun 2008, 1:04 PM
#26
backstage avatar

backstage

Zen Follower

Join Date:
Jan 2006
Posts:
108
Plugin Contributions:
0

Re: Downloads corrupted? v1.3.6

It seems like the problem is here:

if (DOWNLOAD_BY_REDIRECT != 'true' or $link_create_status==false ) {
// not downloading by redirect; instead, we stream it to the browser. This happens if the symlink couldn't happen, or if set as default in Admin
if (DOWNLOAD_IN_CHUNKS != 'true') {
// This will work on all systems, but will need considerable resources
header("Content-Length: " . $zv_filesize);
$zco_notifier->notify('NOTIFY_DOWNLOAD_WITHOUT_REDIRECT___COMPLETED');
readfile(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename']);
} else {
// loop with fread($fp, xxxx) to allow streaming in chunk sizes below the PHP memory_limit
header("Content-Length: " . $zv_filesize);
$handle = fopen(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename'], "rb");
while (!feof($handle)) {
echo(fread($handle, 4096));
flush();
}
fclose($handle);
$zco_notifier->notify('NOTIFY_DOWNLOAD_WITHOUT_REDIRECT_VIA_CHUNKS___COMPLETED');
}
}

If I try to remove this the file i damaged and cant be opened at all. If I copy the code from the other file (the one from your link) it is damaged too.
I I let the code be as it is I got the same problem as described in the beginning.

Download by redirect is set to false
Download by streaming is set to false

I hope you have the time to help, and thank you for all the time you have used to help me.

Kind Regards :)

10 Jun 2008, 4:15 AM
#27
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Downloads corrupted? v1.3.6

What programs are you using to edit these files?
And what FTP program do you use for transferring files?