Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

incorrect path for image upload vs image display??


shopper2

Recommended Posts

Posted

I am moving a site to a different host.

When trying to add a product, in the product description the English image is not shown. Images are uploaded to the correct location but it is displaying from another location. I have no idea why this is happening.. can someone please shed light on how I can fix it?

 

English image path shown when image properties is clicked as follows:

 

http://shop2.hauntedcuriosities.com/store/...images/icon.gif

It should be:

http://shop2.hauntedcuriosities.com/store/...images/icon.gif

 

Product image is correctly uploaded at:

http://shop2.hauntedcuriosities.com/store/...images/11_1.jpg

 

But when product preview is clicked the image properties shows:

http://shop2.hauntedcuriosities.com/store/...images/11_1.jpg

 

Following is catalog/admin/includes/configure.php

 

define('HTTP_SERVER', 'http://shop2.hauntedcuriosities.com/'); // eg, http://localhost or - https://localhost

 

define('HTTP_CATALOG_SERVER', 'http://sterling.nswebhost.com/~deedee/');

 

define('HTTPS_CATALOG_SERVER', 'https://sterling.nswebhost.com/~deedee/');

 

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

 

define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT . 'store/catalog/' ); // where your pages are located on the server.

 

define('DIR_WS_ADMIN', 'store/catalog/admin/');

 

define('DIR_FS_ADMIN', $DOCUMENT_ROOT . 'store/catalog/admin/');

 

define('DIR_WS_CATALOG', 'store/catalog/');

 

define('DIR_FS_CATALOG', $DOCUMENT_ROOT . 'store/catalog/');

 

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/');

 

 

Following is catalog/includes/configure.php

define('HTTP_SERVER', 'http://shop2.hauntedcuriosities.com/'); // eg, http://localhost - should not be empty for productive servers

 

define('HTTPS_SERVER', 'https://sterling.nswebhost.com/~deedee/'); // eg, https://localhost - should not be empty for productive servers

 

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

 

define('HTTP_COOKIE_DOMAIN', 'shop2.hauntedcuriosities.com');

 

define('HTTPS_COOKIE_DOMAIN', 'shop2.hauntedcuriosities.com');

 

define('HTTP_COOKIE_PATH', '/shop2.hauntedcuriosities/store/catalog/');

 

define('HTTPS_COOKIE_PATH', '/shop2.hauntedcuriosities/store/catalog/');

 

define('DIR_WS_HTTP_CATALOG', '/shop2.hauntedcuriosities/store/catalog/');

 

define('DIR_WS_HTTPS_CATALOG', '/shop2.hauntedcuriosities/store/catalog/');

 

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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

 

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

 

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

Posted

For some reason.. the original post was logged as user shopper2 rather than me? seems to be a glitch with the forum.

 

To clarify the the path:

 

English image path shown when image properties is clicked as follows:

 

'http://shop2.hauntedcuriosities.com/store/catalog/admin/store/catalog/includes/languages/english/images/icon.gif'

It should be:

'http://shop2.hauntedcuriosities.com/store/catalog/includes/languages/english/images/icon.gif'

 

Product image is correctly uploaded at:

'http://shop2.hauntedcuriosities.com/store/catalog/images/11_1.jpg'

 

But when product preview is clicked the image properties shows:

'http://shop2.hauntedcuriosities.com/store/catalog/admin/store/catalog/images/11_1.jpg'

Posted

There are so many errors in those files it's hard to know where to begin. But the first thing you need to do is to find out the correct path_to_root, which you need for all the DIR_FS entries. To do that, do the following:

 

1. Create a new text document on your desktop and rename it to cwd.php

2. Put this code in it:

<?php
$p = getcwd();
echo $p;
?>

3. Upload it to your 'catalog' folder via FTP

4. Go to http://www.yourdomain.com/catalog/cwd.php in your browser.

5. Printed on the screen will be your path_to_root (DIR_FS_CATALOG path)

6. Write it down and then delete the cwd.php file from the server.

 

Below I'll post what your settings should be. path_to_root will be used in place of what you'll see when you use cwd.php.

 

Vger

Posted

Forget what I said about putting the cwd.php in the catalog folder - put it in the root of your web. It's late, I'm getting tired.

 

admin/includes/configure.php

----------------------------------

define('HTTP_SERVER', 'http://shop2.hauntedcuriosities.com/');

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

 

define('HTTPS_CATALOG_SERVER', 'https://sterling.nswebhost.com/~deedee/');

 

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

 

define('DIR_FS_DOCUMENT_ROOT', '/path_to_root/store/catalog/' ); // where your pages are located on the server.

 

define('DIR_WS_ADMIN', '/store/catalog/admin/');

 

define('DIR_FS_ADMIN', 'path_to_root/store/catalog/admin/');

 

define('DIR_WS_CATALOG', '/store/catalog/');

 

define('DIR_FS_CATALOG', '/path_to_root/store/catalog/');

 

Vger

Posted

catalog/includes/configure.php

-----------------------------------

define('HTTP_SERVER', 'http://shop2.hauntedcuriosities.com/');

define('HTTPS_SERVER', 'https://sterling.nswebhost.com/~deedee/');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'shop2.hauntedcuriosities.com');

define('HTTPS_COOKIE_DOMAIN', 'sterling.nswebhost.com/~deedee');

define('HTTP_COOKIE_PATH', '/store/catalog/');

define('HTTPS_COOKIE_PATH', '/store/catalog/');

define('DIR_WS_HTTP_CATALOG', '/store/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/store/catalog/');

 

define('DIR_FS_CATALOG', 'path_to_root/store/catalog/);

 

Vger

Archived

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

×
×
  • Create New...