Page 1 of 8 123 ... LastLast
Results 1 to 10 of 74
  1. #1
    Join Date
    Mar 2008
    Posts
    32
    Plugin Contributions
    0

    Default Where to Change the config.php file to point to new downloads folder?

    Hi,

    I've just gotten set up and have moved my download folder outside the web root as suggested for security purposes. I then read the following instructions:
    ---------
    3. Edit your two configure.php files to show the new path to your download folder:
    - /includes/configure.php
    - /admin/includes/configure.php

    You'll need to edit the line that says this:

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

    to look something like this:

    define('DIR_FS_DOWNLOAD', '/home/my_user_name/download/');
    --------

    I found and changed this line in the first file. However, when I look in the /admin/includes/config.php file I can find no line that reads:

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

    Or anything like that... What line do I need to edit - or is it a different file I need to edit to make my zen cart "find" my new download folder?

    Thanks so much!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Where to Change the config.php file to point to new downloads folder

    Look at /admin/includes/dist-configure.php as an EXAMPLE of the various settings that *should* be in your /admin/includes/configure.php file.

    Add in any of the missing define() statements.
    Adjust the DIR_FS_DOWNLOAD statement as required for your needs.

    You probably should do a similar exercise in the main /includes folder.

    Sometimes folks miss the step of upgrading their configure.php files during site-upgrades, and thus end up missing this sort of thing.
    .

    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
    Mar 2008
    Posts
    32
    Plugin Contributions
    0

    Default Re: Where to Change the config.php file to point to new downloads folder

    Thanks for the pointers... In the "admin-config.php" file there are no "download" paths at all! I just tried copying and pasting them from the main config.php file but the zencart still is not seeing my download folder.

    Question - If I move the download folder outside the root folder (as I have done) - do I then need to tell the shopping cart itself the full path? I mean from within the program's admin console? Or just changing it in the config.php files should work?

    What am I missing as far as getting it to find my moved download folder?!

    Thanks again!

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Where to Change the config.php file to point to new downloads folder

    Do not know why you have to have it outside of the root as this area is not web accessible.
    Code:
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      define('DIR_WS_CATALOG', '/');
      define('DIR_WS_HTTPS_CATALOG', '/');
    
      define('DIR_WS_IMAGES', 'images/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
      define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
      define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
      define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
      define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
      define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
    
      define('DIR_WS_PHPBB', '/');
    
    // * DIR_FS_* = Filesystem directories (local/physical)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      define('DIR_FS_CATALOG', '/home/accountname/public_html/');
    
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
      define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
      define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
      define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Mar 2008
    Posts
    32
    Plugin Contributions
    0

    Default Re: Where to Change the config.php file to point to new downloads folder

    Thanks so much...

    I'm sorry - I wasn't saying it right. I meant outside (above) my public_html folder so that people can't just get to my download folder without paying first...

    I added the lines of code to the configure.php file and it still isn't seeing where I moved the download folder to. I moved it just outside the public_html folder - is this correct or does it need to go someplace else?! Or should I just put it back inside that folder - it was working fine there - I just moved it for the security reasons as I read through the Tutorial...

    Thanks again - I really appreciate your help!

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Where to Change the config.php file to point to new downloads folder

    I moved it just outside the public_html folder - is this correct or does it need to go someplace else?!
    Above public is not accessible to the www
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Mar 2008
    Posts
    32
    Plugin Contributions
    0

    Default Re: Where to Change the config.php file to point to new downloads folder

    Okay... I was going by this article on the support site:

    https://www.zen-cart.com/tutorials/i...hp?article=280

    It says:

    Use your FTP program to move your "download" folder outside your webroot. Perhaps drag-and-drop it to a level "above" your public_html folder. The method you choose for moving or creating this folder will depend on your hosting account and the tools available to you for moving folders.

    Usually the "download" folder is located inside your store area, for example:
    - /home/my_user_name/public_html/mystore/download

    You want to move it "above" your public_html folder, something like this:
    - /home/my_user_name/download


    Is this not correct?!!

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Where to Change the config.php file to point to new downloads folder

    There's nothing wrong with moving it outside the webroot, as long as you follow the instructions in that FAQ/tutorial.

    As for your configure.php file not having the DIR_FS_DOWNLOAD entry, go back and re-read my previous reply. It tells you where to get the item you're missing.

    You must have upgraded your site from a few earlier versions but didn't upgrade your configure.php files during the upgrade process, and thus you are missing the normal definitions ... specifically the DIR_FS_DOWNLOAD one (and most likely a few others). If you don't add it in, as I told you to do, the program will assume the default location.
    .

    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.

  9. #9
    Join Date
    Mar 2008
    Posts
    32
    Plugin Contributions
    0

    Default Re: Where to Change the config.php file to point to new downloads folder

    Thanks for the explanations... I actually installed Zen Cart through my hosting providers "netconsole" - so they must have an older version. Should I download a newer version from somewhere to have the latest features? Mine says:

    Zen Cart v1.3.7/v1.3.7

    Thanks again!

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Where to Change the config.php file to point to new downloads folder

    You'll need to edit the line that says this:

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

    to look something like this:

    define('DIR_FS_DOWNLOAD', '/home/my_user_name/download/');
    If your configure.php files are missing an entry for DIR_FS_DOWNLOAD ... then ... as I've said before ... ADD IT, and any others that should be there too.
    In my previous post, I've instructed you on where to find the contents that should be in the file.

    Are you saying you don't want instructions, and prefer just to be spoon-fed?
    .

    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.

 

 
Page 1 of 8 123 ... LastLast

Similar Threads

  1. Replies: 6
    Last Post: 13 Jan 2011, 12:36 AM
  2. where to place php scripts in the file structure?
    By mcolgan in forum General Questions
    Replies: 1
    Last Post: 8 Mar 2010, 11:46 PM
  3. How to make the link point to php file?
    By andrewmax81 in forum General Questions
    Replies: 10
    Last Post: 24 Dec 2009, 01:16 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR