Jump to content



* * * * - 1 votes

OsCommerce Download Feature


  • Please log in to reply
209 replies to this topic

#21   mpm

mpm
  • Members
  • 314 posts
  • Real Name:mike
  • Location:Australia

Posted 12 January 2007 - 04:11 AM

I mean my product_info.php.html file in my sts_templates folder btw.

For that matter, what is the order of importance of product_info, sts_product_info and product_info.php.html?
For my contribution (to society) see my profile link.
--
my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle,  Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

#22   EvilBeeker

EvilBeeker
  • Members
  • 12 posts
  • Real Name:Kevin Melka

Posted 17 January 2007 - 02:36 PM

Hello,

I am experiencing a similar problem as outlined in this thread ... no download link. I followed the instruction to the letter (so I think), and still nothing. Overall though, I've noticed two things that might be preventing this and was hoping I could get someone (Bill) to confirm if this is my issue:


1) Catalog Path

In your above example you have some like this:

define('DIR_FS_CATALOG', '/home/sounkel6/public_html/catalog/');

I've had several hosting accounts, all with different types of "paths". When I open up the root of my files in an FTP session I have a path of: /www/www/catalog/ in my Remote Site path. That is what I put in the above define statement, but now I have to question if that is the "exact" path.


2) PUB directory

In the same config file there is also:

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');


The issue I see here is I have no PUB directory. I created one, but there is not one that I can see and I'm using the "out of box" install of OSC (I've only changed the graphics).


Please advise. I can get everything else to work except this.

Thanks in advance for the help.

#23   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 17 January 2007 - 10:54 PM

View PostEvilBeeker, on Jan 17 2007, 08:36 AM, said:

Hello,

I am experiencing a similar problem as outlined in this thread ... no download link. I followed the instruction to the letter (so I think), and still nothing. Overall though, I've noticed two things that might be preventing this and was hoping I could get someone (Bill) to confirm if this is my issue:


1) Catalog Path

In your above example you have some like this:

define('DIR_FS_CATALOG', '/home/sounkel6/public_html/catalog/');

I've had several hosting accounts, all with different types of "paths". When I open up the root of my files in an FTP session I have a path of: /www/www/catalog/ in my Remote Site path. That is what I put in the above define statement, but now I have to question if that is the "exact" path.


2) PUB directory

In the same config file there is also:

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');


The issue I see here is I have no PUB directory. I created one, but there is not one that I can see and I'm using the "out of box" install of OSC (I've only changed the graphics).


Please advise. I can get everything else to work except this.

Thanks in advance for the help.
Evil,

1) Your define('DIR_FS_CATALOG', '/home/username/public_html/catalog/'); should look very similar to this with your username in place of "username" and the name of your catalog directory in place of "catalog". If you have a cpanel hosting account, log into your file manager and click through starting with the public_html directory until you reach your store directory. This will be your catalog path.

2) You should have something very similar to the following:

  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
  define('DIR_FS_CATALOG', '/home/username/public_html/catalog/');
(username and catalog will be replaced with what is appropriate for your store)
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');


If not, which version of osCommerce did you install? The last two releases included a pub directory. The "pub" directory is the public download path where permissions should be set so that the public can access your downloads after the purchase. You may not have completed the install properly or you are using an older version of osC.

If you created you own pub directory, then you should add a .htaccess file inside of it. The .htaccess file should have at least one line of code:

 Options +FollowSymLinks -Indexes


Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#24   EvilBeeker

EvilBeeker
  • Members
  • 12 posts
  • Real Name:Kevin Melka

Posted 18 January 2007 - 12:55 PM

Thanks for your reply Bill; however, problems remain. Regarding your replies:

1) It turned out I had the right path for the catalog/download define. Thanks.

2) I am on the current version of OSC, and I had no errors or issues during installation. After I did the install I backed up everything under catalog, and I found out last night that I did have a PUB directory at that time. What has happened to is since then is a mystery. I copied over the directory and reset the file permissions on everything.

After doing this the link I had been testing with still did not work. Now I have a few more questions please:

-- In your setup instructions you mention creating item options for DOWNLOAD/YES for the item properties. Does that do anything that would effect the link, or is it just an identifer for the product? I was just wondering if there was something else that needed to be done with that to make the download work.

-- Would it be beneficial to delete the item I've been testing with and just start over from scratch with a new item to test? Or should the link "appear" under the test items if everything is all linked correctly.


I really don't want to have to start this process all over again with a new install of OSC, since everything is working properly *except* the download link.

Thanks for your help.

Kevin

#25   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 18 January 2007 - 11:42 PM

View PostEvilBeeker, on Jan 18 2007, 06:55 AM, said:

-- In your setup instructions you mention creating item options for DOWNLOAD/YES for the item properties. Does that do anything that would effect the link, or is it just an identifer for the product? I was just wondering if there was something else that needed to be done with that to make the download work.

-- Would it be beneficial to delete the item I've been testing with and just start over from scratch with a new item to test? Or should the link "appear" under the test items if everything is all linked correctly.


I really don't want to have to start this process all over again with a new install of OSC, since everything is working properly *except* the download link.

Thanks for your help.

Kevin
Kevin, sorry to hear you are having such a hard time at this. I'll try and help you out...

You do need the Download/Yes set in the Product Attributes page along with all of the other information in that part as well. You do not need to delete what you have done but I suggest that you go to the product attributes page, at the bottom of the page scroll through your products available to select the one you want to set for download. Click the "Edit" button on the right. Make the neccessary changes so that the "option name" is set to "download" and that the "option value" is set to "yes". Be sure the file name is correct and then click on the update button.

If you continue to have problems, osC has a "dummy" file download setup called unreal tournament (unreal.zip). Use this file as a template to go by and let me know if the link shows up for this file or not. If you have not changed your download folder, the unreal.zip should be in there.
Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#26   EvilBeeker

EvilBeeker
  • Members
  • 12 posts
  • Real Name:Kevin Melka

Posted 22 January 2007 - 01:33 AM

View Postbkellum, on Jan 18 2007, 05:42 PM, said:

Kevin, sorry to hear you are having such a hard time at this. I'll try and help you out...

You do need the Download/Yes set in the Product Attributes page along with all of the other information in that part as well. You do not need to delete what you have done but I suggest that you go to the product attributes page, at the bottom of the page scroll through your products available to select the one you want to set for download. Click the "Edit" button on the right. Make the neccessary changes so that the "option name" is set to "download" and that the "option value" is set to "yes". Be sure the file name is correct and then click on the update button.

If you continue to have problems, osC has a "dummy" file download setup called unreal tournament (unreal.zip). Use this file as a template to go by and let me know if the link shows up for this file or not. If you have not changed your download folder, the unreal.zip should be in there.

Starting over on the download items worked Bill. Thanks! Must be something about building them with the wrong setting that prevented it from working if the setting were corrected.

Thanks again!

Kevin

#27   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 23 January 2007 - 11:35 PM

View PostEvilBeeker, on Jan 21 2007, 07:33 PM, said:

Starting over on the download items worked Bill. Thanks! Must be something about building them with the wrong setting that prevented it from working if the setting were corrected.

Thanks again!

Kevin
Good Deal Kevin! :thumbsup:
Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#28   oz16oz2

oz16oz2
  • Members
  • 53 posts
  • Real Name:OZ

Posted 27 January 2007 - 09:08 AM

Hi...

I'm wondering if someone on this thread can help me.

Every time I try to test the osCommerce download function, it appends the filename of the download file with ".HTML".

When I open the html file, it says this:

Warning: mkdir(/home/myusername/public_html/store/pub/.kwhwzujqfmmeqnmjgb) [function.mkdir]: Permission denied in /home/myusername/public_html/store/download.php on line 91

Warning: symlink() [function.symlink]: No such file or directory in /home/myusername/public_html/store/download.php on line 92

Warning: Cannot modify header information - headers already sent by (output started at /home/myusername/public_html/store/download.php:91) in /home/myusername/public_html/store/includes/functions/general.php on line 29

I really have no idea what this means... it's been years since I tinkered with osCommerce.

For what it's worth, in download.php on line 91 it says:
	mkdir(DIR_FS_DOWNLOAD_PUBLIC . $tempdir, 0777);

and on line 92 it says:
	symlink(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'], DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename']);

and on general.php on line 29 it says:
	header('Location: ' . $url);

Does anyone have any easy ideas??  Please??

Cheers.

OZ

#29   jensbruunkofoed

jensbruunkofoed
  • Members
  • 2 posts
  • Real Name:Jens Bruun Kofoed

Posted 29 January 2007 - 02:05 PM

Hi,

I posted this in a new thread, but haven't got any help, so now I try in this one:

We've just opened our new webshop and want to make use of the download feature. For a number of reasons we would prefer to store our mp3's on a different server. Is it possible to use the OSC dowload option if a different IP address is used instead of the default folder (catalog/downloads)? And if so, does it take a lot of php programming? Thanks in advance for any help on this,

Jens

#30   travisseitler

travisseitler
  • Members
  • 1 posts
  • Real Name:Travis Seitler

Posted 14 February 2007 - 07:32 PM

View PostEvilBeeker, on Jan 21 2007, 08:33 PM, said:

Starting over on the download items worked Bill. Thanks! Must be something about building them with the wrong setting that prevented it from working if the setting were corrected.

Same here - I tried adjusting the Product Attributes on an existing item and it didn't work, but setting [Download|yes] on a new item worked great!  :rolleyes:

#31   EvilBeeker

EvilBeeker
  • Members
  • 12 posts
  • Real Name:Kevin Melka

Posted 14 February 2007 - 07:39 PM

View Posttravisseitler, on Feb 14 2007, 01:32 PM, said:

Same here - I tried adjusting the Product Attributes on an existing item and it didn't work, but setting [Download|yes] on a new item worked great!  :rolleyes:

With my issue I was not able to get the download to work until I deleted all of the items out there that would not download properly. Once I did that and added a new item (with the new settings) it worked fine. It was like the system was treating all of the items the same as the first one I entered, even though when I did that the settings in the config were right for later items.

Hope this helps.

- Kevin

#32   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 14 February 2007 - 10:35 PM

View Postoz16oz2, on Jan 27 2007, 03:08 AM, said:

Hi...

I'm wondering if someone on this thread can help me.

Every time I try to test the osCommerce download function, it appends the filename of the download file with ".HTML".

Does anyone have any easy ideas?? Please??

Cheers.

OZ
OZ, did you check the permission settings for your "Pub" and "Download" folders?
Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#33   AlexStudio

AlexStudio
  • Members
  • 1,092 posts
  • Real Name:Alex Li
  • Gender:Male
  • Location:Taipei, Taiwan

Posted 14 February 2007 - 10:55 PM

View Postjensbruunkofoed, on Jan 29 2007, 10:05 PM, said:

Hi,

I posted this in a new thread, but haven't got any help, so now I try in this one:

We've just opened our new webshop and want to make use of the download feature. For a number of reasons we would prefer to store our mp3's on a different server. Is it possible to use the OSC dowload option if a different IP address is used instead of the default folder (catalog/downloads)? And if so, does it take a lot of php programming? Thanks in advance for any help on this,

Jens
It is possible to store your download files outside, but it can be very complicated if you want it to be secured.
Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

#34   alancookie

alancookie
  • Members
  • 1 posts
  • Real Name:Alan Cook

Posted 15 February 2007 - 08:51 PM

Can you add subfolders to the Downloads folder and just add the path to the beginning of the file name?  This would help as I've got hundreds of downloadable files and would like to be able to organize them within the Downloads folder.  Thanks

#35   AlexStudio

AlexStudio
  • Members
  • 1,092 posts
  • Real Name:Alex Li
  • Gender:Male
  • Location:Taipei, Taiwan

Posted 15 February 2007 - 09:11 PM

View Postalancookie, on Feb 16 2007, 04:51 AM, said:

Can you add subfolders to the Downloads folder and just add the path to the beginning of the file name?  This would help as I've got hundreds of downloadable files and would like to be able to organize them within the Downloads folder.  Thanks
If you don't use download by redirect, you can store files in subfolders. However, if you want to use download by redirect and to store files in subfolders, you need my super download shop contribution. (click on the link in my signature line to check it out)
Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

#36   kosmikkreeper

kosmikkreeper
  • Members
  • 17 posts
  • Real Name:Yanik Chauvin

Posted 02 March 2007 - 02:57 PM

Hello all

I managed to get the links to work but.... the downloaded file is only 1k.  I checked and my zip files are properly uploaded.

Now, some mentioned the PUB folder. I have one but it's empty. I read that it should have an .htaccess file in it. Maybe that's my problem. How do I create this file and what should be in it? or can someone email it to me?

#37   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 02 March 2007 - 10:23 PM

View Postkosmikkreeper, on Mar 2 2007, 08:57 AM, said:

Hello all

I managed to get the links to work but.... the downloaded file is only 1k. I checked and my zip files are properly uploaded.

Now, some mentioned the PUB folder. I have one but it's empty. I read that it should have an .htaccess file in it. Maybe that's my problem. How do I create this file and what should be in it? or can someone email it to me?
Just make sure your PUB folder permission settings are correct. Hint: match the settings of your Images folder.
Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#38   kosmikkreeper

kosmikkreeper
  • Members
  • 17 posts
  • Real Name:Yanik Chauvin

Posted 03 March 2007 - 11:34 PM

View Postbkellum, on Mar 2 2007, 05:23 PM, said:

Just make sure your PUB folder permission settings are correct. Hint: match the settings of your Images folder.

My PUB and IMAGE folders are 777, and my download folder is 755 like in the instructions.

I still only get a 1k file. Can you help?

#39   AlexStudio

AlexStudio
  • Members
  • 1,092 posts
  • Real Name:Alex Li
  • Gender:Male
  • Location:Taipei, Taiwan

Posted 03 March 2007 - 11:58 PM

View Postkosmikkreeper, on Mar 4 2007, 07:34 AM, said:

My PUB and IMAGE folders are 777, and my download folder is 755 like in the instructions.

I still only get a 1k file. Can you help?
It seems to me that you didn't use 'download by redirect', your pub folder has nothing to do with your problem.

What is the size of your download file? How long it takes to abort the download with 1k done? Did you enabled gzip compression in admin?
Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

#40   kosmikkreeper

kosmikkreeper
  • Members
  • 17 posts
  • Real Name:Yanik Chauvin

Posted 04 March 2007 - 12:17 AM

View PostAlexStudio, on Mar 3 2007, 06:58 PM, said:

It seems to me that you didn't use 'download by redirect', your pub folder has nothing to do with your problem.

What is the size of your download file? How long it takes to abort the download with 1k done? Did you enabled gzip compression in admin?

Both Enable download and Download by redirect are at TRUE.

The files are between 2 and 3 MB.  It takes about 1 second to download the file (hence the 1 k size). No, Gzip isn't enabled. I just tried it with enabled TRUE and that only got me a blank page, not even a download box. so I put it back to false.

What's next?