Forums / General Questions / Download truncated

Download truncated

Locked

Started by tipzter on 4 Sep 2008, 6:09 PM · Views: 3,534

Results 1 to 20 of 21
This thread is locked. New replies are disabled.
4 Sep 2008, 6:09 PM
#1
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Download truncated

Hi,
I am really new to zen,php and the like. I placed some music in my store as a test ... I have 3 file types for the download... one is a 320 mp3 one is a 192 mp3 and then a wav file. I am able to successfully download both mp3 versions... but the wav file starts to download and then truncates and doesn't finish. It does this at the same spot each time. I put in another wav file and it also does the same thing. I am wondering if I have some sort of setting some place that limits the size.
I downloaded the file direct from my server and it is just fine so it isn't the file.
I have also located these files in the folder above public in the root folder. I tried to do the download via redirect but it would not work even though ipower says it is a unix server. The only way to get it to work was streaming.
Anyone have any idea what is up?

edit--- by truncated I guess I mean... cut off. It says it downloaded fully but gets about 25 seconds in and cuts off.

15 Sep 2008, 1:38 PM
#2
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

I spent most of the weekend looking for an answer to this... anyone come up with any ideas?

15 Sep 2008, 9:33 PM
#3
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

I did notice that all downloads stop after 55 seconds... anybody have an idea?

15 Sep 2008, 11:06 PM
#4
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

Ok... I am going to try this one more time and this time mention some more things that might help.

I am using the current zen cart version.

I tried upping the limit in my PHP.ini file to see if that would allow the downloads to finish - didn't work.

The file size is over 30mb

The lower file size works fine.

It is a wav file.

The wave file stops downloading at around 55 seconds and it doesn't seem to be a size limit but a time limit because when downloading in another browser it was slower and still cut at around the same time give or take a few seconds but the size complete was much different.

16 Sep 2008, 5:53 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Download truncated

How are your downloads set? Redirect? Streaming?

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!

16 Sep 2008, 7:37 PM
#6
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

They are streaming ... I tried redirect (my dl folder is in my root not my public folder) and it keeps giving me an error saying 405 or something like that so the only way to get it to work was streaming.

16 Sep 2008, 7:57 PM
#7
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

I actually just tried the redirect and this is the error page that comes up Bad Request
Your browser sent a request that this server could not understand.

So would streaming make a difference and cut off files like that?

16 Sep 2008, 9:05 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Download truncated

Some tips/caveats related to the different methods are listed in the FAQ on download delivery methods: https://www.zen-cart.com/tutorials/index.php?article=292

.
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 Sep 2008, 9:13 PM
#9
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

DrByte:

Some tips/caveats related to the different methods are listed in the FAQ on download delivery methods: https://www.zen-cart.com/tutorials/index.php?article=292

THanks, I have been over that one a few times and it still doesn't cover this issue.

I did ask the question on a different board and they asked me for the php that shows the files being stored in a file or database to being sent to download anyone know where I look for that code?

16 Sep 2008, 9:16 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: Download truncated

What's your PHP max_execution_time setting set to?

.
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 Sep 2008, 9:23 PM
#11
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

They were set to 60 but I moved them up to 300 and then 600 and up and up and it didn't change the outcome. I also set it on both the zen side as well as the server side.

16 Sep 2008, 10:37 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Download truncated

And is it failing at exactly 55 seconds for everyone? or just certain people?
What about on a dialup connection?

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

17 Sep 2008, 12:53 PM
#13
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

I will have my mom test it on her machine. The site is not up and running for other customers because I can't sort this out and continue adding products until I see if I can actually use the cart. If I can't get it sorted then I will have to try a different cart/ way... so I don't know yet if it is failing for others just on the 2 machines I have tried it on. I will have my mom test it from her house and let you know if it is the same for her.
Thanks though for taking time to help me. I was feeling like I was alone for a bit :)

17 Sep 2008, 1:44 PM
#14
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

Ok same thing happens on her pc.

In the mean time I was reading where most hosts put a limit on php execution time anyway and nobody can change that... so based on that... then what would be a solution for a php based shopping cart with downloads that are over 35mb and will always reach the 60 second time cap?

17 Sep 2008, 2:42 PM
#15
drbyte avatar

drbyte

Sensei

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

Re: Download truncated

If you put your download folder back into public_html and use redirect, does the problem persist?

It seems pretty clear that it's your server's unique configuration that's causing the problems you're experiencing.

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

17 Sep 2008, 4:07 PM
#16
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

I can't get it to do the redirect it keeps giving a 400 bad request error. I have never been able to get that to work even though I am on a server that allows for it. I see that it creates the temp folder with that begins with a (dot) . and then letters like this .tdxfghrtych but then there is never a file that gets put there and when you click on the download it just takes to you to the bad request page. Any ideas how to fix that so I can test it that way?

26 Sep 2008, 4:03 PM
#17
zorg avatar

zorg

New Zenner

Join Date:
Mar 2008
Posts:
3
Plugin Contributions:
0

Re: Download truncated

Same thing is happening to me..
did you ever find the solution ?

1 Oct 2008, 1:36 PM
#18
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

Yes... Zencart isn't the solution for my project. I can't use any php code with larger files and still be on a shared hosting program. I will have to get a Virtual Private Server to use PHP. This is because there is an inherent limit on time PHP script execution time... that runs on a shared hosting server. After talking to about 15 hosting companies I found the average to be about 60 seconds. Most companies will allow you to edit the php.ini file but no matter what number you place in the max_execution, you are still limited by the inherent server max. The excuse they gave about the reason they limit, is "for security reasons".

The only option is to use a cart that does not run PHP script, or to move to a Virtual Private Server (VPS). On a VPS, you have the control of the server and don't have the limits placed on a shared server.

I decided to move away from zencart (because of the limits my server has on the sorts of things I would like to accomplish).

My Granny always told me... "You should never step over dollars to save dimes". I am taking her advice and going to fork out the money for a VPS.

I will be using zencart for another project that is not as complicated and will not require the extended php script execution time.

1 Oct 2008, 2:52 PM
#19
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,846
Plugin Contributions:
0

Re: Download truncated

If the downloads are stored above public_html than the rediredct method will not work. The .tdxfghrtych is a symlink to the original downloads folder and file. You can keep the downloads folder above public_html and use the streaming but you need to have it set up correctly. The maximum execution time is not affected by system calls, stream operations etc.

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

16 Oct 2008, 11:04 PM
#20
tipzter avatar

tipzter

New Zenner

Join Date:
Apr 2008
Posts:
21
Plugin Contributions:
0

Re: Download truncated

If that is the case, then why am I getting everything to work up to a certain time limit? It is configured and redirects and allows you to download but it cuts the download. Play the file (music) that got partially downloaded, and it plays for a few seconds normal and then stops (due to not completing the download)

I would love to have a solution to this, but after a month now... nothing has worked.