strunkwriter Posted May 31, 2003 Posted May 31, 2003 I have been trying to set up my site so that users can download their purchases directly. Checking other postings here, I found http://wiki.oscommerce.com/helpAdminConfig which was very, very helpful, but I have since run into a problem. I suspect the solution is something simple which i have missed, but I just can't wrap my brain around the problem. I set up my products as downloadable zip files. I used (on separate occasions) WINZIP and WINACE to zip them up. Once the files were zipped, I placed the files on my desktop and unpacked them. Everything worked perfectly, the files were in tact and readable. Next I uploaded the files to my host (A linux server, if this helps) into the download file. I checked the file sizes once they arrived, and everything seemed in order. To test again and make sure eveything was working properly. I attempted to download the zip files and store them in a different part of my computer and unpack them. This time, it didn't work. I was greeted with a WINZIP error message that the file in question was not an actual archive file and that, if it was downloaded, I may want to try again. So I tried again, with a couple of different files and received the same results each time. WINZIP did not recognize the file as a zip file. WINZIP's initial response was that the zipped files may have been uploaded in text mode instead of binary mode, which was the most likely cause of problems. I deleted the files from the server and uploaded again, making sure that the FTP software was working in the binary mode. Attempting to download the files again, I came up with the same error. I have e-mailed WINZIP again, but thought I would try again from this angle. The download file permissions are set at 777, the pub file is at 755. The files to be downloaded are currently set at 777, although most of my experimentation today, they have been set at 755. I've been working all day on this, my head hurts and I am completely out of ideas. Any advice from anyone would be much appreciated. TIA, Stacy
Guest Posted May 31, 2003 Posted May 31, 2003 Hello Stacy, Have you made sure the files names match exactly in the atributes section? I also have downloadable products and had a little hard time to set it up. Make sure all the file names match, "case" also makes a difference. HTH :D
Ajeh Posted May 31, 2003 Posted May 31, 2003 Set /download to 775 and /pub to 777 and load your files into /download Try to avoid spaces and extra periods in the filename and remember they are case sensative.
strunkwriter Posted May 31, 2003 Author Posted May 31, 2003 OK, I checked the permissions and I had them switched around on my message, but they were right on the site. the download file is 755 and the pub file is 777. (When I examined the file I decided to add a blank index file, just in case there's a security breach there.) The file names are definitely correct. If the names were incorrect clicking on the name of the file to download wouldn't have worked. I can get the file to download the problem is that somewhere along the lines the file appears to be corrupting or something....I don't know. Keep the ideas coming please, please, please.
Dave_L Posted May 31, 2003 Posted May 31, 2003 Suggestions: Upload a .zip file using FTP, then download the same file using FTP, and test the downloaded file with WinZip. Upload the .zip file using FTP to a place that you can access directly with your browser, e.g., http://example.com/yourpath/testfile.zip, and try downloading and testing it. Try using a different browser and see if that makes a difference. It could be an issue with the MIME Content-type not being set correctly on the server side, or not being interpreted correctly by the browser.
strunkwriter Posted May 31, 2003 Author Posted May 31, 2003 OK, instead of downloading the file through oscommerce, I tried just ftping it back into my computer and opening it. It worked fine. I guess that means that the server is not breaking the file, that something is happening in the process of using OSCommerce to download it, right? Oh, I also tried downloading with a different browser (Netscape -- Great idea, by the way, thanks :D ). Unfortunately, it didn't work with netscape either. So that eliminated a browser problem, correct? Has anyone else had trouble with zipped files?
strunkwriter Posted May 31, 2003 Author Posted May 31, 2003 Pardon the yelling, I was just so darned excited!! I dug through the archives in the community support. (I looked through it before, but this time I REALLY, REALLY dug deep.) And I found the answer: I changed the download through redirect to "false." Apparently having it set at "true" has corruptd some other types of files, so I gave it a try. YIPPEE!! Thanks to everyone who helped!!
Ajeh Posted June 1, 2003 Posted June 1, 2003 Pardon the yelling, I was just so darned excited!! I dug through the archives in the community support. (I looked through it before, but this time I REALLY, REALLY dug deep.) And I found the answer: I changed the download through redirect to "false." Apparently having it set at "true" has corruptd some other types of files, so I gave it a try. YIPPEE!! Thanks to everyone who helped!! I always use true. I wonder why you are running into this. What kind of filenames are you using?
Ajeh Posted June 1, 2003 Posted June 1, 2003 Also, do you have your real path or $DOCUMENT_ROOT in your configure.php file?
strunkwriter Posted June 1, 2003 Author Posted June 1, 2003 I'm using the real path in the configure file. And I was using file names like "lustycoeds.zip" (not a real file name). I used all lower case letters, just to idiot-proof my efforts -- no symbols or punctuation. Just basic files names. Again, I was able to download the file, it was just damaged somehow in the transmition. Thanks again for your help. :D Stacy http://www.elegant-erotica.com (Feel free to check it out. It's for adult Web designers, rather than end users, so you might find the layout a little boring for the subject matter.)
Ajeh Posted June 1, 2003 Posted June 1, 2003 Did you try turning off the Search Engine Friendly URLs? that is most likely messing up things for you.
Dave_L Posted June 1, 2003 Posted June 1, 2003 I always use true. Isn't that insecure? It's not that difficult for someone to figure out the real URL, which would allow them to download files directly.
Guest Posted June 1, 2003 Posted June 1, 2003 Isn't that insecure? It's not that difficult for someone to figure out the real URL, which would allow them to download files directly. Not at all. The download directory has an .htaccess file that prevents "direct downloads". Even if you know the exact url for the file you can't download it. For extra protection I have all my files under the public directory. ;)
Ajeh Posted June 2, 2003 Posted June 2, 2003 I always use true. Isn't that insecure? It's not that difficult for someone to figure out the real URL, which would allow them to download files directly. The filenames are random generated and removed after the download.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.