Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Categories, Products, Attributes / Setting downloads to 7 day expiration with unlimited downloads

Setting downloads to 7 day expiration with unlimited downloads

Locked

Started by chestnut_junction on 22 Oct 2009, 7:23 AM · Views: 5,399

Results 21 to 39 of 39
This thread is locked. New replies are disabled.
25 Oct 2009, 7:06 AM
#21
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #21 by chestnut_junction

Ok, I do not have access to an my ftp program as I am at work, so I will have to check that once I am home. I can access the Pub folder and search for the .htaccess file and find it, but double clicking it does nothing and I can't find any settings within my file manager which allow me to see files beginning with "."

Thanks again for the quick replies, but it looks as if I've hit a wall until I can access my home PC.

~Chris

25 Oct 2009, 10:38 PM
#22
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #22 by chestnut_junction

Ok, I have accessed my .htaccess file and it reads as follows...

#prevent directory browsing -- for security
IndexIgnore /
Options +FollowSymLinks -Indexes

is this correct?

Another question, do I need to set the permissions on my downloadable products to 777?

25 Oct 2009, 11:54 PM
#23
drbyte avatar

drbyte

Sensei

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

Post #23 by drbyte

Chestnut Junction:

Ok, I have accessed my .htaccess file and it reads as follows...

#prevent directory browsing -- for security
IndexIgnore /
Options +FollowSymLinks -Indexes

is this correct?If you're talking about the /pub/.htaccess file then yes that's suitable.
Chestnut Junction:

Another question, do I need to set the permissions on my downloadable products to 777?
Depends why you're asking.

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

26 Oct 2009, 12:32 AM
#24
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #24 by chestnut_junction

Hello again!

Thank you again for your response! I was thinking that maybe not having my product permissions set to 777 was interfering with the download by redirect option, but it doesn't appear to have an effect on that. Also, I have created a test pdf on my site under the "test" category. It is marked as free so the download will be readily available, I just tried to download it from my office PC and it was unreadable/corrupt. If you would be so kind as to try it I would be greatly appreciative :laugh:

Thanks you so much!
~Chris
https://www.epatternjunction.com

26 Oct 2009, 12:41 AM
#25
drbyte avatar

drbyte

Sensei

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

Post #25 by drbyte

1-page PDF downloaded fine.

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

26 Oct 2009, 12:45 AM
#26
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #26 by chestnut_junction

Ok, I'm beginning to think that it is a problem not with zen cart or my host, but with individual settings per customer, if you would be so kind as to try several times to download it both as "OPEN" and "SAVE" I would be sooo appreciative just to verify that it is not coming through as corrupt at any point for you.

Thank you again!
~Chris

26 Oct 2009, 12:57 AM
#27
drbyte avatar

drbyte

Sensei

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

Post #27 by drbyte

seems fine

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

26 Oct 2009, 1:09 AM
#28
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #28 by chestnut_junction

OK, thank you :D Any thoughts on the download by redirect issue? While I was looking at the .htaccess file in my Pub folder, I noticed another item in that folder which must have been a failed download as it was a pdf. My question is, do the permissions on the temporary folder where the download is going and which the customer will be directed to have to be set to 777 as well because I believe the folder I found in my Pub folder was set to 644 if I'm not mistaken, again, I'm stuck at work and unfortunately cannot access my ftp program to verify this :frusty:

Thank you for all of your help!
~Chris

26 Oct 2009, 1:45 AM
#29
drbyte avatar

drbyte

Sensei

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

Post #29 by drbyte

The /download/ folder can be 755 and the files in it 644 --- those are normal permissions.
The /pub/ folder needs to be 777 (so the symlinks can be created by the redirect logic), and the files in it will be generated with whatever appropriate permissions it needs.
The /pub/index.php (or index.html) and the /pub/.htaccess files should typically be set to 644.

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

26 Oct 2009, 3:08 AM
#30
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #30 by chestnut_junction

Ok, I just switched my Attribute settings to download by redirect and the free TEST pattern loads up fine, but any patterns which have a price still give me the "forbidden" error as posted earlier, is there a setting in regards to products which I may be missing which allows them to download by redirect?

Thanks!
~Chris

26 Oct 2009, 3:42 AM
#31
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #31 by chestnut_junction

New info! If I set the items to "Free" the download by redirect works just fine, if they have a price, it will not work, any ideas?

~Chris

26 Oct 2009, 3:45 AM
#32
drbyte avatar

drbyte

Sensei

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

Post #32 by drbyte

I just clicked on the download link and it opened the PDF immediately.

I did notice something about your filenames though ... Zen Cart doesn't presently support subdirectories under the /download/ folder when doing downloads by redirect.
For the files that are triggering a 403/forbidden error at download, are those files stored in subdirectories instead of directly in the /download/ folder? If so, what happens if you move them into the /download/ folder directly (and update the filename in your attribute details accordingly)?

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

26 Oct 2009, 3:46 AM
#33
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #33 by chestnut_junction

OH MY GOODNESS! I didn't even think of that! I'll try one straight away!

~Chris

26 Oct 2009, 4:12 AM
#34
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #34 by chestnut_junction

OK, I moved one of my patterns from the subdirectory and placed it directly in the "download" folder and still received the forbidden error...I checked my error logs and this was within...

[Sun Oct 25 22:32:38 2009] [error] [client 207.13.207.68] Directory index forbidden by Options directive: /home/junction/public_html/pub/.tyuslzstfujnnqj/, referer: http://epatternjunction.com/index.php?main_page=account_history_info&order_id=24

[Sun Oct 25 22:28:52 2009] [error] [client 66.249.71.227] File does not exist: /home/junction/public_html/robots.txt

"forbidden by Options directive:" could that have some relevance?

~Chris

26 Oct 2009, 4:21 AM
#35
drbyte avatar

drbyte

Sensei

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

Post #35 by drbyte

Chestnut Junction:

"forbidden by Options directive:" could that have some relevance?
Well, yes, that's what the "Options" ... "-Indexes" thing in the .htaccess does, and is supposed to do.

But the "Directory index forbidden" suggests that a browser was attempting to browse the folder ... but that's not what Zen Cart would be telling it to do. Zen Cart gives it a file path AND a name. Your log shows it only dealing with a path ... which is triggering the request for a directory index.

Chestnut Junction:

File does not exist: /home/junction/public_html/robots.txtYou can ignore those messages in your log files. They're unrelated to this download 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.

26 Oct 2009, 4:26 AM
#36
ajeh avatar

ajeh

Oba-san

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

Post #36 by ajeh

Create a Download for $1.00 with the test.zip that comes with Zen Cart ...

Make sure that the file is in:
/download

Does it work?

If so, take a larger file and put it in:
/download

Rename it to test.zip

Try to download it again, does it work?

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!

26 Oct 2009, 4:30 AM
#37
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #37 by chestnut_junction

I THINK I SOLVED THE PROBLEM! With alot of help from the wonderful Dr. Byte!!! I removed the "#" from the pdf file name in the download folder and whalah! It popped up immediately! I think that was my issue, the "#" must have been messing up the works in some way, but hopefully this is the answer to the problem :yes::yes:

Thank you soooo much for your patience and information, it has been invaluable to me :hug:

~Chris

26 Oct 2009, 4:30 AM
#38
chestnut_junction avatar

chestnut_junction

New Zenner

Join Date:
Aug 2009
Posts:
35
Plugin Contributions:
0

Post #38 by chestnut_junction

Add also the wonderful Ajeh!

~Chris

26 Oct 2009, 4:31 AM
#39
drbyte avatar

drbyte

Sensei

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

Post #39 by drbyte

Oh yes ... forgot to mention ... use just letters and numbers in filenames. Always safer that way.

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