Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

DIR_WS_IMAGES pointing to outside directory don’t show some of the website images


Andybird

Recommended Posts

Hi everybody,

 

I have two websites, on two different hosts using the same database. In one of the sites I changed the DIR_WS_IMAGES from configure.php to the full path of the other site, so that I get the images from the other site. Everything works fine, except for a couple of things: popup_image.php opens a blank window; button_quick_find.gif, arrow_right.gif and all the other infobox images don’t show in the head of the boxes, and small arrows from Category box enhancement contribution don’t show either.

 

Except for that, all other images generated by tep_image seem to work fine.

 

Strange thing is that when I change the DIR_WS_IMAGES to the same path on a local configuration, everything works fine and all images are shown.

 

Any ideas?

 

Thanks,

Andybird

Link to comment
Share on other sites

When I said full path of the other site, I meant full path of the image directory located on the othere site.

Something like :

 

define('DIR_WS_IMAGES', 'http://www.mysite.com/images/');

 

Any ideas? I spent two days tring to figure it out and I still don't see why it cannot calculat the correct path for those .gifs while all progduct images, also generated by tep_image, show fine.

 

Andybird

Link to comment
Share on other sites

Guys, it's been hours since I look for an answer and it drives me crazy!!! I looked at all posts available but no answer.

There is no one there having 2 websites on different servers using the same image directory of one of the two websites?

 

Please help!

 

Andybird

Link to comment
Share on other sites

there are other functions that generate images like tep_image_submit. And then there is the stylesheet. And then there is the admin end, especially when you upload images - wonder where you going to store them.

 

So you need to modify several things for something like this to work.

Link to comment
Share on other sites

Thanks guys for your interest.

 

Here is my Master configure.php:

 

<?php

define('HTTP_SERVER', 'http://www.clicmusique.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', 'www.clicmusique.com');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/f');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_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', '/var/www/vhost/clicmusique.com/home/html/');

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

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

 

// define our database connection

define('DB_SERVER', 'xxxxxxxx.xxxxxdns.net'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'xxxxx');

define('DB_SERVER_PASSWORD', 'xxxxx');

define('DB_DATABASE', 'xxxxxx');

define('USE_PCONNECT', 'true'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

 

And here is my Slave configure.php:

 

<?php

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.clicmusique.fr'); // 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', 'www.clicmusique.fr');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/f');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_IMAGES', 'http://www.clicmusique.com/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', '/var/www/vhost/clicmusique.fr/home/html/');

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

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

 

// define our database connection

define('DB_SERVER', 'xxxxxxxx.xxxxxdns.net'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'xxxxx');

define('DB_SERVER_PASSWORD', 'xxxxx');

define('DB_DATABASE', 'xxxxxx');

define('USE_PCONNECT', 'true'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

All images that seem to be on a first level PHP file, like product_info.php, seem to display fine. All other images, generated by a second level PHP, like header.php, popup_image.php, column_left.php (except for the flags images that are stored locally in the language directories), don't show.

 

When I use a local configuration (all catalogue files are stored locally, with no image folder), and point the DIR_WS_IMAGE to the full path of the server, EVERYTHING works fine; all type of images are displayed.

 

Here is my local configure.php:

 

<?php

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://127.0.0.1'); // 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', '127.0.0.1');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/diapasoncd/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/diapasoncd/');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_IMAGES', 'http://www.clicmusique.com/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', 'c:/web/easyphp1-8/www/diapasoncd/');

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', 'root');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'diapason');

define('USE_PCONNECT', 'true'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

I surely believe it's a crossing in the addresses when the path is generated. But I don't know where...

 

I look forward to your help, this story is driveing me crazy!

 

Thanks,

Andybird

Link to comment
Share on other sites

...and here is some feedback on the same issue I found on the forum. It may help you guys; it didn't help me...

 

http://www.oscommerce.com/forums/index.php?sho...=195784&hl=

http://www.oscommerce.com/forums/index.php?sho...=243476&hl=

http://www.oscommerce.com/forums/index.php?sho...c=70252&hl=

http://www.oscommerce.com/forums/index.php?sho...=215775&hl=

 

Thanks for your help on this matter!

 

Andybird

Link to comment
Share on other sites

First, understand your issue is important to you, but please understand that people on this board are spread across the globe and there are time differences at hand for people answering your question.

 

Second, it is a holiday weekend so many people are with their families probably.

 

So please be a little more patient when asking questions.

 

Third, see Enigma's post above, it has the answer to your question. The configure.php just changes for the main images. Buttons and such are pulled from other locations (i.e. the language directories). You will need to play with the code in other areas to fix your issue.

Link to comment
Share on other sites

Hi Jeff,

 

If I knew how to play with the code so well as you do, I wouldn't ask how to fix my issue.

Thanks a lot for the suggestions on how to post my queries. I'll be carefull about that.

Although, I would appreciate if you or someone else could bring a more relevant answer.

 

Once again, without changing any code, when my catalogue is localy on my computer and DIR_WS_IMAGES is pointing to images folder on the web server (on the Internet), all images show fine. Second, product images, show fine when on index.php or product_info.php. So why they wouldn't show on popup_image.php? The directory is the same... Is just the way popup_image.php calculate the path that should change comparing to products_new.php for exemple.

 

Thanks for your help.

 

Andybird

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...