Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jan 2009
    Location
    Camano Island, WA
    Posts
    10
    Plugin Contributions
    0

    Default Another Download Thread

    Hi folks...

    I didn't want my first post to be one of moaning in frustration, but I'm almost out of hair to tear out.

    ZC installation on my public server went smoothly after playing with it under MAMP for a while, then I foolishly decided to try a PDF as my first test product. I have the e-Start book (not helpful in this area), have read and applied all the relevant FAQs, and pored through the forum threads.

    At the moment, I have a red dot by the filename, even though I have frequently re-inserted it in the attribute controller. The file exists in /downloads, and the option/value radio button shows up in the product display.

    There is also, today, no button to download the purchased file, even though the customer account page says "To download your files click the download button and choose "Save to Disk" from the popup menu." Last night, before additional poking around, that button DID exist, though any attempt to use it either hung with zero bytes transferred, or, more frequently, informed me that I don't have permission to access the (temporary redirect) folder. Pub permissions are 777, and I have download by redirect set.

    I probably haven given enough information to provide a definitive answer, but my real question is whether there is a clear document somewhere that describes this process? I'm a newbie at Zen Cart, but certainly not with servers and software; manipulating config files and such is standard fare here. And yet I am finding this utterly opaque, mostly for lack of any clear explanation.

    No doubt this is just PEBCAK (Problem Exists Between Chair and Keyboard), but I'm at wit's end. I know this has been discussed a lot, and I *have* searched the forum threads. Version is 1.3.8a, running under Linux/Apache.

    Otherwise, ZC is looking pretty cool. I'm looking forward to putting it to use.

    Cheers and thanks,
    Steve

  2. #2
    Join Date
    Jan 2009
    Location
    Camano Island, WA
    Posts
    10
    Plugin Contributions
    0

    Default Re: Another Download Thread

    PS - Thinking I'd just start over, I invoked the screen of "Attribute Features" from the products page. Attempting to delete all product attributes yielded this interesting error message:

    Fatal error: Cannot use object of type queryFactoryResult as array in [root/admin]/includes/functions/general.php on line 2089

    (my path redacted above, but is correct)

    Perhaps this is a clue. Or a bug.

    Oh, and the red dot for "invalid filename" persists, even though the file exists with no case mismatch (just a PDF of just under a megabyte).

    Cheers,
    Steve
    Last edited by Nomadness; 15 Feb 2009 at 02:38 AM.

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

    Default Re: Another Download Thread

    As you said, instructions for setting up downloads are discussed in many places in the FAQs and on the forum. I'm not sure what you think is unclear.

    The "red light" occurs when the system cannot find the file on the filesystem. In a fresh new clean uncustomized install, that path is built from: /public_html/YOURSITEFOLDER/download/THEFILENAME.EXT

    Common causes of that not working are:
    - you've edited your configure.php files and altered the paths for the download folder to point to something invalid
    - you've edited one configure.php file but not the other
    - you've set permissions on the /download/ folder in such a way that prevents PHP and/or apache from having access to it
    - you've attempted to load downloadable files into a subfolder below the /download/ folder, which is not a supported approach

    Normally none of these situations would occur unless intentionally altering normal configurations.


    The download link on the My Account area typically will not show if the file cannot be found.
    .

    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
    Jan 2009
    Location
    Camano Island, WA
    Posts
    10
    Plugin Contributions
    0

    Default Re: Another Download Thread

    Hi... thanks for the quick response, and the specific things to check!

    Quote Originally Posted by DrByte View Post
    As you said, instructions for setting up downloads are discussed in many places in the FAQs and on the forum. I'm not sure what you think is unclear.
    The concept. (though that is likely a problem here, as other people have clearly passed this way before... but still, it isn't the clearest process for a ZC beginner)

    The "red light" occurs when the system cannot find the file on the filesystem. In a fresh new clean uncustomized install, that path is built from: /public_html/YOURSITEFOLDER/download/THEFILENAME.EXT
    That is what is confusing. The file does exist there (and since my post above, I also tried a zip version, convinced the attribute controller of the fact, and still found a red light.

    Common causes of that not working are:
    - you've edited your configure.php files and altered the paths for the download folder to point to something invalid
    - you've edited one configure.php file but not the other
    Those have not changed since last night, when I did have a download button on the file (it didn't work, whether from just hanging or giving the permissions error, but it did exist).

    - you've set permissions on the /download/ folder in such a way that prevents PHP and/or apache from having access to it
    774 on that folder, 777 on /pub. The latter contains .htaccess in the form noted in an earlier thread.

    - you've attempted to load downloadable files into a subfolder below the /download/ folder, which is not a supported approach
    Nope, I just put the files into the download folder that also contains test.zip, test2.zip, unreal.zip, and ms_word_sample.zip - all of which came with the installation via Fantastico on cpanel. I haven't tried to get fancy with anything.

    Normally none of these situations would occur unless intentionally altering normal configurations.

    The download link on the My Account area typically will not show if the file cannot be found.
    I wonder why that would have changed. I'll certainly examine both configure.php instances, though my only interaction with them has been the very minor tweak of title text and the like (I know, it should be with overrides... one learning curve at a time).

    I saw this identical issue raised in the long thread on downloads, but not explicitly answered before the questioner's problem apparently went away. At the moment, I am seeing red light on the file in the attribute controller even though it exists and has been named, and no download link even though earlier tests had one (enabled by switching status to DELIVERED). I'll go check those configure files to be sure the expected path has not changed.

    Thanks,
    Steve

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

    Default Re: Another Download Thread

    Have you done too much customizing to go back and do a clean fresh install including the demo data? The demo data includes a couple working download products ... perhaps the example might be useful, as well as a confirmation of testing the actual download process.
    .

    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
    Jan 2009
    Location
    Camano Island, WA
    Posts
    10
    Plugin Contributions
    0

    Default Re: Another Download Thread

    You know... I wondered about that. I did not have the install populated with demo data, and am therefore a bit puzzled about what those things are doing in the /download folder. The customization has not been huge, but still a few hours... I'd consider that a last-ditch effort. I really haven't done anything invasive (heck, here's the link if you want to see it).

    I did a composite screen capture of the phenomenon; perhaps this contains a clue for one who is more familiar with the system.

    Thanks again for your time and suggestions,
    Steve
    Attached Images Attached Images  

  7. #7
    Join Date
    Jan 2004
    Posts
    66,447
    Plugin Contributions
    81

    Default Re: Another Download Thread

    What are your settings for the following, in both configure.php files?

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

  8. #8
    Join Date
    Jan 2009
    Location
    Camano Island, WA
    Posts
    10
    Plugin Contributions
    0

    Default Re: Another Download Thread

    Quote Originally Posted by DrByte View Post
    What are your settings for the following, in both configure.php files?

    DIR_FS_CATALOG
    DIR_FS_DOWNLOAD
    In admin:

    define('DIR_FS_CATALOG', '/home/microshi/public_html/nomadicresearchlabs.com/store/');

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


    In the store:

    define('DIR_FS_CATALOG', '/home/microshi/public_html/nomadicresearchlabs.com/store/');

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


    - Steve

    (oh, and sorry for that barely-readable screen capture back there... making it PNG kinda shrunk it!)

  9. #9
    Join Date
    Jan 2004
    Posts
    66,447
    Plugin Contributions
    81

    Default Re: Another Download Thread

    The download_manager script looks at the path defined by DIR_FS_DOWNLOAD, with the filename tacked on the end.

    So, in your case, it's looking for:
    '/home/microshi/public_html/nomadicresearchlabs.com/store/download/THE_FILENAME.EXT'

    There are only a couple reasons for it showing a red problem icon:
    - file doesn't exist at that location (ie: wrong filename given or wrong paths defined)
    - permissions too low on the folder/files
    - something altered in the server filesystem preventing PHP from running a file_exists() query to determine whether the file is present
    .

    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.

  10. #10
    Join Date
    Jan 2009
    Location
    Camano Island, WA
    Posts
    10
    Plugin Contributions
    0

    Default Re: Another Download Thread

    Quote Originally Posted by DrByte View Post
    There are only a couple reasons for it showing a red problem icon...
    It must be the last one, then. The test file (sexbar.zip - not as naughty as it sounds) is clearly there with all lower case and 644 permissions. What would inhibit the file_exists() PHP query?

    Many thanks,
    Steve

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Download Fetch [support thread]
    By skipwater in forum All Other Contributions/Addons
    Replies: 119
    Last Post: 4 Nov 2012, 05:54 PM
  2. Another SSL thread...
    By Crooked_Halo in forum Basic Configuration
    Replies: 6
    Last Post: 10 Aug 2008, 03:25 PM
  3. Yet another attributes thread!
    By DaveG in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 17 Sep 2006, 02:43 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