Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Root Folder Issue - I'm stumped


sl0flyer

Recommended Posts

Posted

Hi All,

 

I have been given the task to revive and update an oscommerce shopping cart. I believe it is version 1.1. Here is the first part of the index.php page:

<?php
/*
 $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $
*/

 

I have moved OSCommerce shopping carts between servers before, but for some reason it isn't going as well this time.

 

The site is here: www.anavontech.com/cedarcreek as you can see, It seems to be connected to the database, but the root directory for many of the files doesn't appear to be including the subfolder that the site is in.

 

Here are my config.php files. Any help would be greatly appreciated.

 

<?php
 define('HTTP_SERVER', 'https://anavontech.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTP_CATALOG_SERVER', 'http://anavontech.com');
 define('HTTPS_CATALOG_SERVER', 'https://anavontech.com');
 define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', '/home/------/public_html/cedarcreek/'); // where the pages are located on the server
 define('DIR_WS_ADMIN', '/cedarcreek/------/'); // absolute path required
 define('DIR_FS_ADMIN', '/home/-------/public_html/cedarcreek/-----/'); // absolute pate required
 define('DIR_WS_CATALOG', '/cedarcreek/'); // absolute path required
 define('DIR_FS_CATALOG', '/home/------/public_html/cedarcreek/'); // absolute path required
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', '-----');
 define('DB_SERVER_PASSWORD', '-----');
 define('DB_DATABASE', '-----');
 define('USE_PCONNECT', 'false'); // use persisstent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

// CLR 020605 defines needed for Product Option Type feature.
 define('PRODUCTS_OPTIONS_TYPE_SELECT', 0);
 define('PRODUCTS_OPTIONS_TYPE_TEXT', 1);
 define('PRODUCTS_OPTIONS_TYPE_RADIO', 2);
 define('PRODUCTS_OPTIONS_TYPE_CHECKBOX', 3);
 define('PRODUCTS_OPTIONS_TYPE_TEXTAREA', 4);
 define('TEXT_PREFIX', 'txt_');
 define('PRODUCTS_OPTIONS_VALUE_TEXT_ID', 0);  //Must match id for user defined "TEXT" value in db table TABLE_PRODUCTS_OPTIONS_VALUES
?>

 

AND

 

<?php
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://anavontech.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'anavontech.com');
 define('HTTPS_COOKIE_DOMAIN', '/cedarcreek/');
 define('HTTP_COOKIE_PATH', '/cedarcreek/');
 define('HTTPS_COOKIE_PATH', '/cedarcreek/');
 define('DIR_WS_HTTP_CATALOG', '/cedarcreek/');
 define('DIR_WS_HTTPS_CATALOG', '/cedarcreek/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/------/public_html/cedarcreek/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', '------');
 define('DB_SERVER_PASSWORD', '-----');
 define('DB_DATABASE', '--------');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

// STS: ADD: Define Simple Template System files
 define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
 define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php');
 define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
 define('STS_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html');
 define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
// STS: EOADD
// CLR 020605 defines needed for Product Option Type feature.
 define('PRODUCTS_OPTIONS_TYPE_SELECT', 0);
 define('PRODUCTS_OPTIONS_TYPE_TEXT', 1);
 define('PRODUCTS_OPTIONS_TYPE_RADIO', 2);
 define('PRODUCTS_OPTIONS_TYPE_CHECKBOX', 3);
 define('PRODUCTS_OPTIONS_TYPE_TEXTAREA', 4);
 define('TEXT_PREFIX', 'txt_');
 define('PRODUCTS_OPTIONS_VALUE_TEXT_ID', 0);  //Must match id for user defined "TEXT" value in db table TABLE_PRODUCTS_OPTIONS_VALUES
?>

Posted

Thanks for the reply, I am just trying to make the cart work in a subfolder of this other site. I removed the www's and the .htaccess file during the troubleshooting processes.

 

Do you see any obvious reasons why the image paths do not include the subfolder "cedarcreek"?

 

Thanks again

Posted

I now see what you meant by "https" in the first define. I did not catch that. It is fixed now, but my the paths are still not correct for many files. Do I need to define a root folder?

Posted

I now see what you meant by "https" in the first define. I did not catch that. It is fixed now, but my the paths are still not correct for many files. Do I need to define a root folder?

Quite likely you have an alias defined in your server httpd.conf file (or .htaccess file) that re-writes all calls to the 'images' directory to the 'graphics' directory.

 

edit: Even with that, the couple of images I searched for are not in your images directory.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Thanks again for the input.

 

I have removed the htaccess file with no luck. -it wasn't working correctly anyway.

 

The images are there. If you look at a broken path to an image, you can get to that image simply by adding the sub directory "cedarcreek" to the path.

 

Any other ideas?

Posted

Thanks again for the input.

 

I have removed the htaccess file with no luck. -it wasn't working correctly anyway.

 

The images are there. If you look at a broken path to an image, you can get to that image simply by adding the sub directory "cedarcreek" to the path.

 

Any other ideas?

Where is the word 'graphics' being injected into the URL for the images? Have you tried turning off STS?

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Here is an image path as it stands:

http://anavontech.com/graphics/cedarcreek-image.gif'>http://anavontech.com/graphics/cedarcreek-image.gif

 

Here is the actual location of the images:

http://anavontech.com/cedarcreek/graphics/cedarcreek-image.gif

 

I'm willing to bet if I put this on the root of the domain(without the cedarcreek subfolder), This cart would be working 100%. This cart was originally in a root directory, now I am trying to install it in a subfolder.

 

Does this give any clues?

Posted

Here is an image path as it stands:

http://anavontech.com/graphics/cedarcreek-image.gif'>http://anavontech.com/graphics/cedarcreek-image.gif

 

Here is the actual location of the images:

http://anavontech.com/cedarcreek/graphics/cedarcreek-image.gif

 

I'm willing to bet if I put this on the root of the domain(without the cedarcreek subfolder), This cart would be working 100%. This cart was originally in a root directory, now I am trying to install it in a subfolder.

 

Does this give any clues?

But according to your configure files that you copied here, the image directory is images/ and not graphics/

 

I'm beginning to think you mistakenly showed us the wrong configure.php file.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Thanks for the help/input. I figured it out... I am embarrassed how simple it was.

 

 

define('HTTP_SERVER', 'http://anavontech.com/cedarcreek');

define('HTTP_CATALOG_SERVER', 'http://anavontech.com/cedarcreek');

 

On to the next problem :)

Posted

Thanks for the help/input. I figured it out... I am embarrassed how simple it was.

 

 

define('HTTP_SERVER', 'http://anavontech.com/cedarcreek');

define('HTTP_CATALOG_SERVER', 'http://anavontech.com/cedarcreek');

 

On to the next problem :)

Actually, that did nothing to fix it on my end. In fact, I think it will hurt things in the long run. I have a shop with the catalog in a sub-directory and that is NOT how my configure.php file reads.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Wow... thank you for the prompt replies. Try it again... all of the images come up properly now.

 

This cart will not be in a subfolder for long, I'm just testing it out and updating it. As you can see now the links off of the homepage are

 

http://anavontech.com/cedarcreek/cedarcreek/index.php?cPath=30 which is causing issues.

Posted

Wow... thank you for the prompt replies. Try it again... all of the images come up properly now.

 

This cart will not be in a subfolder for long, I'm just testing it out and updating it. As you can see now the links off of the homepage are

 

http://anavontech.com/cedarcreek/cedarcreek/index.php?cPath=30 which is causing issues.

If the actual images location is 'graphics' why does your configure.php files say to look in 'images' for them?

 

I would remove the 'cedarcreek' from the http server setting and correct the location of your images (although you DO have a directory at http://www.anavontech.com/cedarcreek/images which is available for the public to see (security risk) AND one at http://www.anavontech.com/cedarcreek/graphics which is also available for the public to see. Which do you actually want to use?

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Archived

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

×
×
  • Create New...