Forums / Bug Reports / [Done v1.3.9c] Downloads not completing properly in v1.3.9a/b

[Done v1.3.9c] Downloads not completing properly in v1.3.9a/b

Locked

Started by z3nguy54321 on 13 May 2010, 10:55 PM · Views: 1,374

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
13 May 2010, 10:55 PM
#1
z3nguy54321 avatar

z3nguy54321

New Zenner

Join Date:
May 2010
Posts:
2
Plugin Contributions:
0

[Done v1.3.9c] Downloads not completing properly in v1.3.9a/b

I am using the latest version of Zencart. (v1.3.9b) Yesterday the downloads were working. Today each download is 4kb when I attempt to download any of them and are corrupt. I spoke with the host. They had let me know that nothing has been changed or updated

In the log file I am getting the following error

PHP Warning: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for /zencart_dir/download/myfile.zip in /zencart_dir/includes/templates/template_default/templates/tpl_modules_downloads.php on line 41, referer: /zencart_dir/index.php?main_page=checkout_confirmation

Any help would be much appreciated.

14 May 2010, 5:52 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.9c] Downloads not completing properly in v1.3.9a/b

Z3Nguy54321:

In the log file I am getting the following error

PHP Warning: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for /zencart_dir/download/myfile.zip in /zencart_dir/includes/templates/template_default/templates/tpl_modules_downloads.php on line 41, referer: /zencart_dir/index.php?main_page=checkout_confirmation
That message is telling you that your server's configuration is preventing PHP from accessing file properties, namely the file size.
What are your /download/ folder's permissions set to? Ask your hosting company what the correct setting is based on your server's PHP configuration.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 May 2010, 8:00 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.9c] Downloads not completing properly in v1.3.9a/b

Z3Nguy54321:

I am using the latest version of Zencart. (v1.3.9b). Each download is 4kb when I attempt to download any of them and are corrupt.

Try making the following coding change:

/includes/modules/pages/download/header_php.php
change line 115 from this:```
$downloadFilesize = filesize(DIR_FS_DOWNLOAD . [B]$originFilename[/B]);

to this:```
$downloadFilesize = filesize(DIR_FS_DOWNLOAD . [B]$origin_filename[/B]);
```Then try your download again by accessing it from your My Account area.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 May 2010, 2:45 PM
#4
z3nguy54321 avatar

z3nguy54321

New Zenner

Join Date:
May 2010
Posts:
2
Plugin Contributions:
0

Re: [Done v1.3.9c] Downloads not completing properly in v1.3.9a/b

That change on line 115 worked thanks!