Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Dec 2008
    Posts
    24
    Plugin Contributions
    0

    Default Download error no matter what. (File not found)

    Hello all!

    My Zencart store isn't fully cooperating..

    When shopping a downloadable product, it doesn't find the file that is meant to ble downloaded. This has nothing to do with the configuration on Admin side, admin find the file and in this case we're using the test.zip file that comes with Zencart.

    It doesn't matter what filetype og name it has, and I've tried with all kind of settings in Configure>attributes.

    I told my host about this and they said it is something wrong the the configure file. What file they meant I don't know. I think it has something to do with the includes>configure.php

    Here is includes>configure.php:
    HTML Code:
    // Define the webserver and path parameters
      // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
      // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
      define('HTTP_SERVER', 'http://solvenus.no');
      define('HTTPS_SERVER', 'https://solvenus.no');
    
      // Use secure webserver for checkout procedure?
      define('ENABLE_SSL', 'false');
    
    // 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', '/nettbutikk/');
      define('DIR_WS_HTTPS_CATALOG', '/nettbutikk/');
    
      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/solvenu/public_html/nettbutikk/');
    
      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/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'zen_');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', 'xxx');
      define('DB_SERVER_PASSWORD', 'xxx');
      define('DB_DATABASE', 'xxx');
      define('USE_PCONNECT', 'false'); // use persistent connections?
      define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage
    
      // The next 2 "defines" are for SQL cache support.
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
      define('SQL_CACHE_METHOD', 'database'); 
      define('DIR_FS_SQL_CACHE', '/home/solvenu/public_html/nettbutikk/cache');


    This is admin>includes>configure.php:

    HTML Code:
     define('HTTP_SERVER', 'http://solvenus.no');
      define('HTTPS_SERVER', 'https://solvenus.no');
      define('HTTP_CATALOG_SERVER', 'http://solvenus.no');
      define('HTTPS_CATALOG_SERVER', 'https://solvenus.no');
    
      // Use secure webserver for catalog module and/or admin areas?
      define('ENABLE_SSL_CATALOG', 'false');
      define('ENABLE_SSL_ADMIN', 'false');
    
    // 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_ADMIN', '/nettbutikk/admin/');
      define('DIR_WS_CATALOG', '/nettbutikk/');
      define('DIR_WS_HTTPS_ADMIN', '/nettbutikk/admin/');
      define('DIR_WS_HTTPS_CATALOG', '/nettbutikk/');
    
      define('DIR_WS_IMAGES', 'images/');
      define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
      define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
      define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
      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_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');
    
    // * 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_ADMIN', '/home/solvenu/public_html/nettbutikk/admin/');
      define('DIR_FS_CATALOG', '/home/solvenu/public_html/nettbutikk/');
    
      define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
      define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
      define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
      define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
      define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'zen_');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', 'xxx');
      define('DB_SERVER_PASSWORD', 'xxxx');
      define('DB_DATABASE', 'xxx');
      define('USE_PCONNECT', 'false'); // use persistent connections?
      define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage
    
      // The next 2 "defines" are for SQL cache support.
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
      define('SQL_CACHE_METHOD', 'database'); 
      define('DIR_FS_SQL_CACHE', '/home/solvenu/public_html/nettbutikk/cache');

    Heres a link to the english side of our online store:
    http://solvenus.no/nettbutikk/index....ex&language=en

    If you want to help us and need to test our store, go to "MENU_PRODUKT" (yes, I need to change that one) in the menu and buy the product "test". Try to download it..

    I won't cost you anything

    Thank you
    Svein Daniel Solvenus

  2. #2
    Join Date
    Dec 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Download error no matter what. (File not found)

    Attribute Settings is set to:
    Enable Downloads true
    Download by Redirect true
    Download by streaming false

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

    Default Re: Download error no matter what. (File not found)

    Quote Originally Posted by solvenus View Post
    This has nothing to do with the configuration on Admin side, admin find the file and in this case we're using the test.zip file that comes with Zencart.
    If the admin shows a green dot next to the file in the Downloads Manager, then it means it can find the file, and thus a "Download by redirect = FALSE" should work fine. However, you have password-protected your /download/ folder, which blocks the Redirect=FALSE from working.

    Quote Originally Posted by solvenus View Post
    Attribute Settings is set to:
    Enable Downloads true
    Download by Redirect true
    Download by streaming false
    Since you've got Redirect=TRUE set, then the files are served from your /pub/ folder. This means your /pub/ folder needs to have (a) read+write permissions set on it, and (b) symlinks need to be allowed. Your store will need to create a symlink inside the /pub/ folder in order to set up the redirect each time someone clicks the download link for the requested file.
    .
    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.

  4. #4
    Join Date
    Dec 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Download error no matter what. (File not found)

    Thank you DrByte for answering!

    I removed the password protection from the download folder and removed sett Redirect to FALSE. And admin is showing a green dot next to the file in Download Manager.

    The same problem again.

    The pub folder have read write access. 777.

    How do I allow symlinks?


    I truly don't understand what is wrong. The same error happens everytime, what ever configuration I use. The error has to be something fundamental.

    When I use redirect = true, can the download folder be password protected?

    Thank you
    Svein Daniel Solvenus

    PS. I've left the password protection off (Redirect=FALSE). So if someone want to try again, I am happy to let that someone be my guest =)

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

    Default Re: Download error no matter what. (File not found)

    Unzip the attached symlinktest script and upload the .php file to your server, in the store root ... ie: the same folder as your /pub/ folder can be found.

    Then open it via your browser by typing your store URL and instead of adding index.php, use symlinktest.php

    What happens?
    Attached Files Attached Files
    .
    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.

  6. #6
    Join Date
    Dec 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Download error no matter what. (File not found)

    SYMLINK TEST RESULTS:
    DIR_FS_DOWNLOAD = /home/solvenu/www/nettbutikk/download/
    Selected Filename = test.zip
    Filename for Browser = test.zip
    Symlink Filename = /home/solvenu/www/nettbutikk/pub/.tgCMJjCyoutWnNeY/test.zip

    Symlink Message = ERROR - could not create symlink
    Symlink Exists? = NO
    Download test link: test.zip


    This is what I got.
    Do you know what I do about this?

    I've put Download by Rerdirect = TRUE
    Pub and download folder is set to 777

  7. #7
    Join Date
    Dec 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Download error no matter what. (File not found)

    I searched my files after the word symlink and this came up:

    /home/solvenu/public_html/nettbutikk/includes/modules/pages/download/header_php.php

    Line #133 : $link_create_status = @symlink(DIR_FS_DOWNLOAD . $origin_filename, DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $download_link);

    Line #136 : $zco_notifier->notify('NOTIFY_DOWNLOAD_VIA_SYMLINK___BEGINS');

    I don't know if this is relevant..
    Last edited by solvenus; 11 Dec 2008 at 11:34 AM.

  8. #8
    Join Date
    Nov 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Download error no matter what. (File not found)

    Hi
    I have the same problems and tried the test.
    It creates the symlink but don't find it!

    Symlink Message = No error when creating symlink
    Symlink Exists? = NO

    ...and then I get the same error page when trying the download link.
    What to do?

  9. #9
    Join Date
    Nov 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Download error no matter what. (File not found)

    Hi
    I just solved my problem with download by redirect, by spelling out the full "COMPLETE path" for the download library as it tells 2 lines above the "define('DIR_FS_DOWNLOAD' " line. In your case it should be:

    // * 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/solvenu/public_html/nettbutikk/');

    define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . '/var/www/vhost/accountname/public_html/store/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/');

    Used the same path in bouth configure.php files .

    Cheers from Dalarna in Sweden

  10. #10
    Join Date
    Dec 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Download error no matter what. (File not found)

    Tack söta bror =)

    Then it seems we're one step closer to a solution:

    Warning: filesize() [function.filesize]: stat failed for /home/solvenu/public_html/nettbutikk//home/solvenu/public_html/nettbutikk/download/ in /home/solvenu/public_html/nettbutikk/symlinktest.php on line 24

    SYMLINK TEST RESULTS:
    DIR_FS_DOWNLOAD = /home/solvenu/public_html/nettbutikk//home/solvenu/public_html/nettbutikk/download/
    Selected Filename =
    Filename for Browser =
    Symlink Filename = /home/solvenu/public_html/nettbutikk/pub/.wnUFviwJSqDnwViXXFWI/

    Symlink Message = ERROR - could not create symlink
    Symlink Exists? = YES
    Download test link:

    Now the link is missing...

    And there is a red errormessage in the store: http://solvenus.no/nettbutikk/index....ex&language=en

    This is the configure.php (I made the change in both files)

    Code:
    // * 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/solvenu/public_html/nettbutikk/');
    
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . '/home/solvenu/public_html/nettbutikk/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/');

    Anyone?

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Download configure file not found
    By hara in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 26 Dec 2010, 09:22 PM
  2. Replies: 6
    Last Post: 10 Jun 2010, 01:13 PM
  3. Error: File Not Found - (Zip file)
    By Dreameffects in forum General Questions
    Replies: 3
    Last Post: 7 May 2008, 02:45 AM
  4. Download File Page Not Found Error
    By jaxbakers in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 15 Aug 2006, 05:00 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