Site maintenance: Tuesday 17 Nov, from 10:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / Downloads corrupted? v1.3.6

Downloads corrupted? v1.3.6

Locked

Started by backstage on 12 May 2008, 2:34 PM · Views: 3,173

Results 1 to 20 of 27
This thread is locked. New replies are disabled.
12 May 2008, 2:34 PM
#1
backstage avatar

backstage

Zen Follower

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

Downloads corrupted? v1.3.6

Hi

When a user download a file from the shop there are problems:
Some HTML code are added to the end of the files, and the files therefore are corrupted after downloading.

This error is shown

Warning: main(includes/templates/template_default/templates/tpl_download_default.php): failed to open stream: No such file or directory in /includes/templates/mytemplatename/common/tpl_main_page.php on line 111

Fatal error: main(): Failed opening required 'includes/templates/template_default/templates/tpl_download_default.php' (include_path='.:.:') in /includes/templates/mytemplatename/common/tpl_main_page.php on line 111

It doesn't matter if You use Firefox, Internet Explorer or Safari.
It docent matter what you connection speed is.

Download by redirect is set to off
Download by streaming is set to off

If you download the files using FTP the files is NOT corrupted.

It seems like an error somewhere in the Zencart php code for download

I have searched for this problem, and have found threads, but I cant find a solution, so I really hope you are able to help me :)

Please feel free to ask if you have questions

Can somebody please help me how to solve this problem?

Kind regards
Backstage :)

12 May 2008, 6:06 PM
#2
dwells avatar

dwells

Zen Follower

Join Date:
Nov 2007
Location:
Burney, CA. USA
Posts:
130
Plugin Contributions:
2

Re: Downloads corrupted? v1.3.6

For best results on getting an answer to your question you will need to provide more information.

What version of Zen Cart are you running?

What version of PHP is your cart running on?

What file extensions (examples>> .zip, .exe, .mp3, .jpg, .gif, .pdf, .doc) are coming up corrupt?

With this information, someone may be able to better help you.
(a link to your site might help too)

Patience is Virtue...
ShopWells.com

Current Version of Zen Cart: 1.3.8a

12 May 2008, 9:27 PM
#3
backstage avatar

backstage

Zen Follower

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

Re: Downloads corrupted? v1.3.6

I am running:
Zencart 1.3.6 (no possibility to upgrade)
PHP 4.3.10
It is all files I have tried so far for example zip and pdf

I hope someone are able to help me :)

13 May 2008, 3:30 PM
#4
backstage avatar

backstage

Zen Follower

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

Re: Downloads corrupted? v1.3.6

Anybody???

13 May 2008, 8:07 PM
#5
dwells avatar

dwells

Zen Follower

Join Date:
Nov 2007
Location:
Burney, CA. USA
Posts:
130
Plugin Contributions:
2

Re: Downloads corrupted? v1.3.6

Backstage:

I am running:
Zencart 1.3.6 (no possibility to upgrade)
PHP 4.3.10
It is all files I have tried so far for example zip and pdf

I hope someone are able to help me :)

You are going to have a tough time getting help on this one.
Zen Cart v. 1.3.6 as it's Support Life has expired>> http://www.zen-cart.com/forum/showthread.php?t=72868 <<

You really should consider upgrading... version 1.3.8a has a lot of bug fixes, security fixes, as well as some new functionality.

PHP 4.3.10 is no longer supported either due to security issues, sound like your store needs upgraded all the way around.

Sorry I couldn't be of more help.

Patience is Virtue...
ShopWells.com

Current Version of Zen Cart: 1.3.8a

14 May 2008, 3:06 PM
#6
backstage avatar

backstage

Zen Follower

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

Re: Downloads corrupted? v1.3.6

Yeah I know but cant do that, so I hope someone know the problem and would be nice to help

14 May 2008, 3:11 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Downloads corrupted? v1.3.6

Did you try reloading clean copies of those missing files in the error message?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

14 May 2008, 4:44 PM
#8
backstage avatar

backstage

Zen Follower

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

Re: Downloads corrupted? v1.3.6

Hi

Thanks a lot for your reply

The strange thing is that this file:
'includes/templates/template_default/templates/tpl_download_default.php'
dosent exist in my shop or in the default files.

I have downloaded Zencart 1.3.6 again today to be sure, and it isent there either

The only file here with tpl_download... is: tpl_download_time_out_default.php

There are also a file called tpl_modules_downloads.php

But nothing else in that folder called something with download

I really hope you can help me

Thanks a lot

Best Regards :)

14 May 2008, 5:26 PM
#9
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Downloads corrupted? v1.3.6

It gets even stranger.

Unless a developer can confirm differently, no version of Zen Cart since 1.3.6 at least, contains a file called "tpl_download_default.php".

And this msg.:
/includes/templates/mytemplatename/common/tpl_main_page.php on line 111

refers to an error msg. for "uploading" a file.

Is a module or custom code being used for your downloading? The situation does not appear normal, in that sense that it relates to default Zen Cart files.

Note: perhaps a call is trying to be made to this file:
includes/templates/template_default/templates/tpl_download_time_out_default.php

but for whatever reason, the file calling it is using the wrong file name?

The learning is in the doing.

Potent Products

14 May 2008, 5:32 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: Downloads corrupted? v1.3.6

There is no template for tpl_download_default.php ... because the download module is supposed to "die" before ever calling the template.

There were some quirks with that in older versions, fixed in newer versions.

An upgrade may resolve your issue.

.
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 2008, 5:35 PM
#11
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Downloads corrupted? v1.3.6

Actually, the whole "error msg. problem" is beside the point. Until the actual error is fixed the problem will continue.

When a user download a file from the shop there are problems:
Some HTML code are added to the end of the files, and the files therefore are corrupted after downloading.

I suggest deleting what is there now and re upload the original file(s) for downloading.

The learning is in the doing.

Potent Products

14 May 2008, 5:36 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Downloads corrupted? v1.3.6

The extra HTML content added to end of files ... is the same issue that was fixed in newer versions.

.
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.

15 May 2008, 3:09 PM
#13
backstage avatar

backstage

Zen Follower

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

Re: Downloads corrupted? v1.3.6

But if I try to download the file using FTP, nothing is wrong
The Code is added when clicking at the download link

I do not have the possibility to upgrade this one :(

But do you know where the link is generated, so that I maybe can correct it?

15 May 2008, 11:19 PM
#14
drbyte avatar

drbyte

Sensei

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

Re: Downloads corrupted? v1.3.6

You could try this alpha patch which is designed for 1.3.7:
http://www.zen-cart.com/forum/showthread.php?p=439190#post439190

Use at your own risk if you're applying it to other versions.

.
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.

16 May 2008, 10:47 PM
#15
backstage avatar

backstage

Zen Follower

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

Re: Downloads corrupted? v1.3.6

It dosent work either :(

But where is the link beeing generated? . maybe I can somehow change it myself
Kind regards :)

17 May 2008, 6:29 AM
#16
drbyte avatar

drbyte

Sensei

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

Re: Downloads corrupted? v1.3.6

It's that file that controls the delivery of the download files.
And it's that file that exits execution when the browser is handed off to the file, thus preventing the HTML from being added to it.

.
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.

18 May 2008, 12:35 PM
#17
backstage avatar

backstage

Zen Follower

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

Re: Downloads corrupted? v1.3.6

That file only has this code inside (it cant generate the link right ? :) ):

<?php /** * Page 4 * * @package page * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $ */ require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php')); $breadcrumb->add(NAVBAR_TITLE); // include template specific file name defines $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_PAGE_4, 'false'); ?>

Kind regards :)

18 May 2008, 12:44 PM
#18
drbyte avatar

drbyte

Sensei

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

Re: Downloads corrupted? v1.3.6

I don't know where you got that file contents from. It's certainly not from the attachment in the post I linked you to earlier.

.
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.

20 May 2008, 3:06 PM
#19
backstage avatar

backstage

Zen Follower

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

Re: Downloads corrupted? v1.3.6

Hi

It is this file:
includes/modules/pages/download/

Isent that the correct one (I seem to be lost hehe, but thanks for your patience)?

Kind regards

20 May 2008, 4:43 PM
#20
drbyte avatar

drbyte

Sensei

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

Re: Downloads corrupted? v1.3.6

You quoted code that belongs to /includes/modules/pages/page_4/header_php.php.

.
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.