Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

problems with the download module


Recommended Posts

My company is using osCommerce for a client that has a music store. The module creates a temporary directory and uses symbolic links for the downloads. I don't know if this is how it's normally set up since I'm not the one who initially started customizing the site and the guy that did is unavailable for the foreseeable future. I do know the directory and link were successfully made, though. The problem is that I keep getting a 403 error whenever I try to download anything via the link but targeting actual files in the same directory work just fine.


Any ideas what the problem might be? Thanks for the help.


  header("Expires: Mon, 26 Nov 1962 00:00:00 GMT");
 header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
 header("Cache-Control: no-cache, must-revalidate");
 header("Pragma: no-cache");
 header("Content-Type: Application/octet-stream");
 header("Content-disposition: attachment; filename=" . $downloads['orders_products_filename']);

$tempdir = tep_random_name();
$dirmade = mkdir(DIR_FS_DOWNLOAD_PUBLIC . $tempdir, 0777);
$syli = symlink(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'], DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename']);
tep_redirect(DIR_WS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename']);

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...