Forums / Setting Up Categories, Products, Attributes / Serving downloads from outside public_html

Serving downloads from outside public_html

Locked

Started by shadez2270 on 15 Dec 2006, 8:11 PM · Views: 1,668

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
15 Dec 2006, 8:11 PM
#1
shadez2270 avatar

shadez2270

Inactive

Join Date:
Nov 2006
Posts:
24
Plugin Contributions:
0

Serving downloads from outside public_html

In order to secure the downloads folder I have moved it outside the public_html folder. I have also adjusted my configure.php files accordingly and downloads are functioning as they should.

What could possibly be my problem you ask :wacko:

When I add the download attribute and specify the filename the dot stays red even if the file is in the folder (I assume the attribute files are looking in the default location). While this is really a minor issue and has no bearing what so ever on the functionality of the cart, the chances of me making a typo while entering the couple hundred products I have is pretty good, and an on the spot visual clue would be fantastic and would save me from having to downloaad each and every product in the cart to see if I named it correctly.

I am fairly certain this will require editing one of the php files, but when I do that blindly this usually happens :lamo:

So I thought I would see if one of you gurus could point me in the right direction.

I did search the forum and the wiki and 9 times out of 10 I can find the answer there, but couldn't find this one.

I apologize if I missed it somewhere

Thanks in advance

Shadez2270

My Zen Carts

Scroll Saw Patterns

Scroll Saw Art

I donate... DO YOU ?!?

15 Dec 2006, 8:53 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Serving downloads from outside public_html

Without looking at code yet, I recall doing this for a client, and I believe that started with setting this parameter properly in the admin version of the configure.php file as well, to reflect your new location:

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

.
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 Dec 2006, 10:15 PM
#3
shadez2270 avatar

shadez2270

Inactive

Join Date:
Nov 2006
Posts:
24
Plugin Contributions:
0

Re: Serving downloads from outside public_html

I double checked that and I have it set as

define('DIR_FS_DOWNLOAD', 'home/scroll/download/');

Certainly appreciate you looking into it for me...

editing the title of the post so it would be found easier by others with the same issue was something I should have thought of

Shadez2270

My Zen Carts

Scroll Saw Patterns

Scroll Saw Art

I donate... DO YOU ?!?

15 Dec 2006, 10:19 PM
#4
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Serving downloads from outside public_html

shadez2270:

I double checked that and I have it set as

define('DIR_FS_DOWNLOAD', 'home/scroll/download/');

>  
> Certainly appreciate you looking into it for me... 
>  
> editing the title of the post so it would be found easier by others with the same issue was something I should have thought of

try changing it to:

/home/scroll/download/


instead.. it should find it then
15 Dec 2006, 10:27 PM
#5
shadez2270 avatar

shadez2270

Inactive

Join Date:
Nov 2006
Posts:
24
Plugin Contributions:
0

Re: Serving downloads from outside public_html

Quote:

Originally Posted by shadez2270 [IMG]http://www.zen-cart.com/forum/images/ZCgreen/buttons/viewpost.gif[/IMG]
I double checked that and I have it set as

Code:
define('DIR_FS_DOWNLOAD', 'home/scroll/download/');

try changing it to:

Code:
/home/scroll/download/
instead.. it should find it then
changed the line of code to read

 define('DIR_FS_DOWNLOAD', home/scroll/download/);
 

and got this

 
Parse error: parse error, unexpected ')' in /home/scroll/public_html/cart/admin/includes/configure.php on line 69

Did I miss something.... PHP is certainly not my forte

Thank you again

Shadez2270

My Zen Carts

Scroll Saw Patterns

Scroll Saw Art

I donate... DO YOU ?!?

15 Dec 2006, 10:40 PM
#6
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Serving downloads from outside public_html

shadez2270:

Quote:

changed the line of code to read

define('DIR_FS_DOWNLOAD', home/scroll/download/);

> and got this 
> ```
 
Parse error: parse error, unexpected ')' in /home/scroll/public_html/cart/admin/includes/configure.php on line 69

Did I miss something.... PHP is certainly not my forte

Thank you again

whoops.. i guess i was a little confusing :P

I meant this:

define('DIR_FS_DOWNLOAD', '/home/scroll/download/');

it needs those tiny quotes around it :)

15 Dec 2006, 10:49 PM
#7
shadez2270 avatar

shadez2270

Inactive

Join Date:
Nov 2006
Posts:
24
Plugin Contributions:
0

Re: Serving downloads from outside public_html

That was the ticket! what a difference a / makes LOL

And I found about 7 I had already typed in wrong...

Thanks guys thats what I love about ZEN everyone is willing to help!

Maybe by the time I get this set up I will be able to answer a question or two myself

Thank you again

Shadez2270

My Zen Carts

Scroll Saw Patterns

Scroll Saw Art

I donate... DO YOU ?!?