shed studio Posted May 25, 2004 Posted May 25, 2004 Ok, so i'm new to php but I've got a hold of most of the features in osCommerce. Now to the problem that I have ... in the administration section I have gone to 'Configuration -> Download'. I will be selling downloadable products from the site when complete, so I have edited the following: 'Enable Download' from false to 'true' 'Download by redirect' from false to 'true' when viewing the download enabled site the following warning is displayed: 'Warning: The downloadable products directory does not exist: /home/musiccit/public_html/catalogdownload/. Downloadable products will not work until this directory is valid.' Now there should be a '/' in between 'catalog' and 'download' to make the correct path. In configure.php, the download path is defined in this code: define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); my question(s): 1.should there be a '/' somewhere in the DIR_FS_CATALOG to end the folder path? 2. Is this the right place to define the path to the download folder? 3. If so, How do I modify this code to correct the problem? 4. If not, Where and how do I fix this problem? Any and all help is much appreciated. ;)
johnk Posted May 25, 2004 Posted May 25, 2004 Until someone with more knowledge answers, my guess is: Yes, create a directory in /catalog named "download". (catalog/download/ or you might try catalog/catalogdownload) Put a file in there and see if it can be downloaded. There's probably more to it, but it may work for you. On the other hand, if you don't have a directory named catalog and all your files reside in public_html, then try creating a file called catalogdownload in that directory. Nothing in the wiki?
shed studio Posted May 27, 2004 Author Posted May 27, 2004 thanks johnk, 'catalog' was the directory that osCommerce was installed into so it already exists, as does 'download' within the 'catalog' directory. did a search in the Wiki and found nothing. Am I the first one to have had this error? Anyway, after 2 days of dickin' around with possible combinations of code, and suffering many brain meltdowns :wacko: , I finally came up with this: modify code in '/includes/configure.php' from define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])); to this define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']). '/'); adding the . '/' at the end of the file directory path seems to have rectified the problem. the five keystrokes that saved my world :wub: I have tested and have no problems so far, :unsure: but as I said in the first post of this thread, I am new to php and if there is a more correct way to rectify the error I would apperciate the input.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.