Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2006
    Posts
    28
    Plugin Contributions
    0

    Default 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

    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

    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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Not you rusual downloads question

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

  3. #3
    Join Date
    Nov 2006
    Posts
    28
    Plugin Contributions
    0

    Default Re: Serving downloads from outside public_html

    I double checked that and I have it set as

    Code:
    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
    Last edited by shadez2270; 15 Dec 2006 at 11:16 PM. Reason: highlighted exisiting code

  4. #4
    Join Date
    May 2006
    Location
    Texas
    Posts
    565
    Plugin Contributions
    4

    Default Re: Serving downloads from outside public_html

    Quote Originally Posted by shadez2270 View Post
    I double checked that and I have it set as

    Code:
    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:

    Code:
     /home/scroll/download/
    instead.. it should find it then

  5. #5
    Join Date
    Nov 2006
    Posts
    28
    Plugin Contributions
    0

    Default Re: Serving downloads from outside public_html

    Quote:
    Originally Posted by shadez2270
    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
    Code:
     define('DIR_FS_DOWNLOAD', home/scroll/download/);
    and got this
    Code:
     
    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

  6. #6
    Join Date
    May 2006
    Location
    Texas
    Posts
    565
    Plugin Contributions
    4

    Default Re: Serving downloads from outside public_html

    Quote Originally Posted by shadez2270 View Post
    Quote:

    changed the line of code to read
    Code:
     define('DIR_FS_DOWNLOAD', home/scroll/download/);
    and got this
    Code:
     
    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

    I meant this:

    Code:
    define('DIR_FS_DOWNLOAD', '/home/scroll/download/');
    it needs those tiny quotes around it :)

  7. #7
    Join Date
    Nov 2006
    Posts
    28
    Plugin Contributions
    0

    Default 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

 

 

Similar Threads

  1. Replies: 6
    Last Post: 16 Dec 2012, 09:21 PM
  2. Replies: 24
    Last Post: 4 Jan 2012, 06:27 AM
  3. Replies: 2
    Last Post: 4 Feb 2008, 09:42 PM
  4. Moved cart from test dir to public_html, nothing works
    By daneh in forum Installing on a Linux/Unix Server
    Replies: 13
    Last Post: 22 Jan 2008, 05:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg