Forums / Setting Up Categories, Products, Attributes / Problems with Downloads....

Problems with Downloads....

Locked

Views: 2,943

Results 1 to 20 of 23
This thread is locked. New replies are disabled.
7 Nov 2007, 11:24 PM
#1
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Problems with Downloads....

I just installed Zen Cart on my server for the company I work for.

I put in a couple of test products and tried a PDF download. It worked and I was able to download the file.

A while later, I did several things including the following:

  1. Moved the download file outside of the root (I have changed this back since then)
  2. Changed templates
  3. Setup Paypal IPN

Downloads are not working now. That attached image shows that error that I get when I try to download files.

I am on an IIS 6 server.

I have streaming marked as true, and redirect marked as false. and I have been trying to sort through all of the different download thread, but none of the suggestions seem to have worked for me.

I don't know what to try next. Any suggestions would be appreciated.

7 Nov 2007, 11:42 PM
#2
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

Additional Note:

I tried zipping the PDFs and then uploading them, and changing the Options/Attribute stuff to use the ZIPs instead of the plain PDFs.

Now, it will download them, but says that it is an invalid file when I try to open it, even though it shows the right file size when I check the properties.

8 Nov 2007, 12:21 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: Problems with Downloads....

Does the updated file in this thread help?
http://www.zen-cart.com/forum/showthread.php?p=439190#post439190

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

8 Nov 2007, 1:17 AM
#4
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

Nope --goes from downloading a corrupt zip file to saying that the file cannot be read, kinda like in the image in my first post.

8 Nov 2007, 1:49 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: Problems with Downloads....

Yet, you said it used to work before you made a number of changes ... ?

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

8 Nov 2007, 12:56 PM
#6
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

I tried it once, right after I first setup the cart (and figured out how to add downloadable files). And it worked.

Then I changed the template (from the default to the glossy_black).
Then I added Paypal IPN

I also made a downloads directory outside of my web root and put the files there (but cannot remember if I did this BEFORE or AFTER I tested the first download). I just figured out a problem that I had been having with the directory being outside my wwwroot folder, so I have it outside there again.

But in its original directory or the one I created. It seems that installing the Paypal IPN or the template may have been what caused it to break.

8 Nov 2007, 1:17 PM
#7
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Problems with Downloads....

  1. What happens when you revert back to Classic template?
  2. download folder is named just that..not downloads.
  3. download folder must contain htaccess file
  4. download folder must be situated in zencart install i.e.
    where you can see index.php file
  5. Zencart does not like zip files that contain hyphens,underscores or capitals

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

8 Nov 2007, 1:40 PM
#8
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

misty:

  1. What happens when you revert back to Classic template?

I reverted back, and no changes.
I reverted back and removed Paypal IPN and no changes

misty:

  1. download folder is named just that..not downloads.

folder is named download, not downloads. Attribute Manager gives me the little green dot (first time I tried to move it outside the wwwroot folder, I missed a spot in the admin configure.php where I had to change the directory path, so things never got the green dot, so put it back -- got it back outsite wwwroot and have the green dot now).

misty:

  1. download folder must contain htaccess file
  2. download folder must be situated in zencart install i.e.
    where you can see index.php file

I tried it in the original location. I also currently have moved it to outside the wwwroot folder as explained in this FAQ item -- https://www.zen-cart.com/tutorials/index.php?article=280

I am on an IIS server, so I would really prefer to have it located outside my root...

Now, I didn't have the .htaccess file or the index.php file in the folder outside of my wwwroot, so I just added them, and no luck with that either.

I have also tried deleting the download folder from the zen cart folder as well. Still no changes in how it it acting.

misty:

  1. Zencart does not like zip files that contain hyphens,underscores or capitals

So far, my test files have all been named
ea1.pdf
ea2.pdf
ea3.pdf

and/or

ea1.zip
ea2.zip
ea3.zip

And all files have been under 2 MB in size (I have some that will be closer to to 30MB when I am done, but am using small files for testing at the moment).

Also, I have the cart installed on a sub-domain. so the URL is shop.xxxxxxx.com

IIS has that sub-domain located in a folder inside my wwwroot folder.

so that the path to the cart is D:/Domains/xxxxxxxxxx.com/wwwroot/shop/

I currently have the download folder located at
D:/Domains/xxxxxxxxxx.com/download

8 Nov 2007, 1:44 PM
#9
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Problems with Downloads....

Have never successfully achieved download option in zencart,
where download folder is offsite or away from zencart install.
So am afraid cannot help you further myself..hopefully
Ajeh/Dr Byte,zencart devs, can...

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

8 Nov 2007, 1:48 PM
#10
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

Hey, I can put the folder back in place and we can try to make it work there. :)

It only takes a few seconds to put it all back.. hehe

8 Nov 2007, 1:51 PM
#11
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Problems with Downloads....

Rasyr:

Hey, I can put the folder back in place and we can try to make it work there. :)
It only takes a few seconds to put it all back.. hehe
This should work, IF download folder has correct permissions
set and contains necessary .htaccess file..

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

8 Nov 2007, 1:56 PM
#12
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

ok, download folder is once again residing within the zen cart root folder.

still no joy....

8 Nov 2007, 2:03 PM
#13
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

misty:

This should work, IF download folder has correct permissions
set and contains necessary .htaccess file..

Okay, what permissions SHOULD the download folder have?

I will double check with my host and see what they say.

8 Nov 2007, 2:04 PM
#14
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

DrByte:

Does the updated file in this thread help?
http://www.zen-cart.com/forum/showthread.php?p=439190#post439190

Here is a screenshot of the error message I receive when I use the updated file from that link.

8 Nov 2007, 3:01 PM
#15
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Problems with Downloads....

You have checked green light/s via download manager?
Your download folder has necessary .htaccess file?
Both your config files are correctly configured?
If all these are correct, then as mentioned before,
advice required from zencart dev i.e. ajeh, as she
wrote download module..
Have a feeling that htaccess file and permissions maybe
set on zencart install, but again, ajeh can verify this..

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

8 Nov 2007, 3:16 PM
#16
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

misty:

You have checked green light/s via download manager?

Yes, green lights all the way.

misty:

Your download folder has necessary .htaccess file?

Yes.

misty:

Both your config files are correctly configured?

Yes.

misty:

If all these are correct, then as mentioned before,
advice required from zencart dev i.e. ajeh, as she
wrote download module..
Have a feeling that htaccess file and permissions maybe
set on zencart install, but again, ajeh can verify this..

With the old header_php.php file in place, it will get between 83% and 99% downloaded and then stop, and then give the error message in my first post.

With the new file, that DrByte suggested I install, it immediately gives that error message (the second image I posted).

My boss would really like it if I could get this working for us before next week.

8 Nov 2007, 3:30 PM
#17
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Problems with Downloads....

My boss would really like it if I could get this working for us before next week.Have sent ajeh PM, requesting quick look at this thread **
when she has a spare moment..she is very busy lady**

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

8 Nov 2007, 3:37 PM
#18
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

thanks!!

8 Nov 2007, 6:25 PM
#19
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Problems with Downloads....

I am all fixed!! :clap:

I had forgotten that while I had been working on setting this up, I had made a few other changes within some of the configuration settings...

I have used Zen Cart before (on a linux server) and had enabled gzip compression, and it never really made any difference that I could see.

So, while going through and making normal setting changes, I enabled the gzip compression on this installation as well. Figured it couldn't hurt.

Silly me..... :oops:

I was going to try an turning downloads off and then on, when I hit the wrong menu option and went to the gzip compression screen. I figured that since some of the files I was testing were zip files, that perhaps it was interfering with the winzip archive somehow. So I turned it back off....

And bing bang boom!!!!! My downloads work again! I also just shifted my download directory to outside my wwwroot folder (again - no htaccess or index.php file) and it still works without a hitch!!:clap::clap::clap:

So, here is a tip for folks on Windows servers.. Leave GZIP Compression off!!!

And a request -- the next time that Zen Cart is updated, please at a note to the GZip compression screen telling folks that it may cause problems on Windows servers!!

8 Nov 2007, 6:33 PM
#20
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Problems with Downloads....

(again - no htaccess or index.php file)
So your new offsite download directory is protected?
Otherwise it could be accessed directly via browser..
Great news to hear you appear to have sorted problem/s

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others