Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Cannot find file for download

Cannot find file for download

Locked

Views: 5,929

Results 1 to 20 of 20
This thread is locked. New replies are disabled.
20 Aug 2007, 10:05 PM
#1
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Cannot find file for download

I have set up a free test download file for my site. I can get through the check-out process and I am taken to a page that shows the download listed, but when I click on it, I get this message:

Sorry. File not found. Please contact the webmaster to report this error.
c/f: CC_Spellbound_Stamps.zip

I have uploaded the file CC_Spellbound_Stamps.zip
to my shop/download folder.

I have checked the address I entered into the attributes manager - it is as follows:

CC_Spellbound_Stamps.zip

Do I need to list the directory path exactly - http:// - etc?

Any help would be appreciated.

Thanks.

20 Aug 2007, 11:47 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot find file for download

Are you hosted on Windows or on Linux server ?
What are your settings in Admin->Configuration->Attribute Settings ?

21 Aug 2007, 2:39 AM
#3
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Re: Cannot find file for download

DrByte:

Are you hosted on Windows or on Linux server ?
What are your settings in Admin->Configuration->Attribute Settings ?

I am on a Linux Server.

If I check the orders that are processing, It says that CC_Spellbound_Stamps.zip is not on server.

Atributes Settings:
Enable Downloads  	true  	 
Download by Redirect 	true 	Info 
Download by streaming 	false 	Info 
Download Expiration (Number of Days) 	30 	Info 
Number of Downloads Allowed - Per Product 	5 	Info 
Downloads Controller Update Status Value 	4 	Info 
Downloads Controller Order Status Value >= lower value 	2 	Info 
Downloads Controller Order Status Value <= upper value 	4 	Info 
Enable Price Factor 	true 	Info 
Enable Qty Price Discount 	false 	Info 
Enable Attribute Images 	true 	Info 
Enable Text Pricing by word or letter 	true 	Info 
Text Pricing - Spaces are Free 	1 	Info 
Read Only option type - Ignore for Add to Cart 	1
21 Aug 2007, 2:44 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot find file for download

Admin->Catalog->Downloads Manager ... does your file show up there ? What's its status ?

What are the folder permissions on the /download folder and on the /pub folder ?

If you change Download by Streaming to on, what happens?
And if you change Download by Redirect to false, what happens ? (true is better, but depends on the proper security of the /pub folder)

21 Aug 2007, 2:53 AM
#5
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Re: Cannot find file for download

DrByte:

Admin->Catalog->Downloads Manager ... does your file show up there ? What's its status ?

What are the folder permissions on the /download folder and on the /pub folder ?

If you change Download by Streaming to on, what happens?
And if you change Download by Redirect to false, what happens ? (true is better, but depends on the proper security of the /pub folder)

It is showing that the "Missing Filename" (red circle)

I've seen it, but I cannot remember where to change the streming and the redirect info.

Permissions on the download and pub folder are 777

21 Aug 2007, 2:58 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot find file for download

CerysCrow:

It is showing that the "Missing Filename" (red circle)What if you make it all lower-case filenames ?

21 Aug 2007, 2:59 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot find file for download

CerysCrow:

I've seen it, but I cannot remember where to change the streming and the redirect info.

Um ... you just pasted your settings for those in your last post ...

But changing those will have no effect if the filename doesn't exist.

21 Aug 2007, 3:00 AM
#8
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Re: Cannot find file for download

DrByte:

Um ... you just pasted your settings for those in your last post ...

But changing those will have no effect if the filename doesn't exist.

LOl! It's been a LOOONG day!

21 Aug 2007, 3:09 AM
#9
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Re: Cannot find file for download

I've changed the filename to ccspellboundstamps.zip, changed my settings to streaming true and redirect fale - no luck.

I get the same message: Sorry. File not found. Please contact the webmaster to report this error.
c/f: ccspellboundstamps.zip

21 Aug 2007, 3:10 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot find file for download

What are your permissions on the /download folder?

21 Aug 2007, 3:11 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot find file for download

What does DIR_FS_DOWNLOAD point to in your /includes/configure.php file ?

21 Aug 2007, 3:18 AM
#12
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Re: Cannot find file for download

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

21 Aug 2007, 3:22 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot find file for download

Okay, that's good.

What about the permissions settings ?

21 Aug 2007, 3:35 AM
#14
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Re: Cannot find file for download

Permissions on both the download anf th pub are 777.

(configure.php is 644)

21 Aug 2007, 3:36 AM
#15
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Re: Cannot find file for download

ccspellboundstamps.zip is 777

21 Aug 2007, 4:23 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot find file for download

CerysCrow:

I've changed the filename to ccspellboundstamps.zip, changed my settings to streaming true and redirect fale - no luck.

I get the same message: Sorry. File not found. Please contact the webmaster to report this error.
c/f: ccspellboundstamps.zip
and when you changed the filename, you did it both in the product attributes in the admin as well as in your FTP ?

21 Aug 2007, 10:19 AM
#17
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Re: Cannot find file for download

yes, I changed both.

21 Aug 2007, 10:29 AM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot find file for download

Okay ... time to try some debugging.

  1. what's the DIR_FS_CATALOG setting in your configure.php files?

  2. edit your /includes/modules/pages/download/header_php.php file using a clean text editor (ie: Crimson Editor or Notepad++ are good choices)

around line 57 you'll find this:```
// Die if file is not there
if (!file_exists(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename'])) die('Sorry. File not found. Please contact the webmaster to report this error.<br />c/f: ' . $downloads->fields['orders_products_filename']);

insert a NEW line ABOVE that code, like this:```
[B]echo 'CHECKING FILE: ' . DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename'] . '<br />';[/B]
// Die if file is not there
if (!file_exists(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename'])) die('Sorry. File not found. Please contact the webmaster to report this error.<br />c/f: ' . $downloads->fields['orders_products_filename']);
```Test the download from your customer account again.
Hopefully it'll tell us the real path it's looking for.

Then we'll compare that against the DIR_FS_CATALOG and DIR_FS_DOWNLOAD settings, as well as your FTP path to the /download folder.
21 Aug 2007, 10:45 AM
#19
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Re: Cannot find file for download

I've got the download to work! It's amazing what a few hours of sleep will do.

This morning, I checked the user account I had set up. I noticed that in the section that shows previous orders, the download file was listed and showed the expiry date and downloads left info, but the filename did not display a size.

This seemed weird, and coupled with the fact that zen cart is saying that the file cannot be found, I decided to check my server through a different FTP program (I generally use Dreamweaver to upload my files.)

Sure enough, the file was simply not on the server, so I re-uploaded through Cyberduck and now all is well.

I am not sure why Dreamweaver "appeared" to be uploading files correctly. I will use Cybercuck for all my zen cart uploads, from now on.

Thanks for all your help.

21 Aug 2007, 10:54 AM
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot find file for download

Yes, sleep can work wonders.

I use Dreamweaver regularly for editing and file-uploading, but prefer to use a "real" dedicated FTP program for things other than php code files that I'm editing. It can be quirky at times.

I recommend FileZilla to most people because it's free and I think I've only ever seen one person report a problem using it and I think their host was to blame, not the software. Of course, it's for windows PCs.