Zen Cart Logo
Forums / General Questions / Missing images in SSL pages?

Missing images in SSL pages?

Locked

Views: 2,180

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
8 Aug 2008, 5:50 AM
#1
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

Missing images in SSL pages?

On the secured pages of my shop, the images no longer appear. I am using a shared certificate. Where or how do I set the image path to work

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
[B]  define('HTTP_SERVER', 'http://mydomain.com');
  define('HTTPS_SERVER', 'https://secure.myserver.com/~mydomain');[/B]

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

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_CATALOG', '/shop/');
  define('DIR_WS_HTTPS_CATALOG', '/shop/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  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', DIR_WS_CATALOG . 'pub/');
  define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
8 Aug 2008, 6:00 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Missing images in SSL pages?

aly22:

On the secured pages of my shop, the images no longer appear. I am using a shared certificate. Where or how do I set the image path to work

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
[B] define('HTTP_SERVER', 'http://mydomain.com');
define('HTTPS_SERVER', 'https://secure.myserver.com/~mydomain');
[/B]

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

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/shop/');
define('DIR_WS_HTTPS_CATALOG', '/shop/');


Is the correct shared-SSL URL to your site the following?
<https://secure.myserver.com/~mydomain/shop> 

What happens when you go there with your browser?
What happens when you type in the full URL to one of your images?  ie: <https://secure.myserver.com/~mydomain/shop/images/no_picture.gif> ?
Who are you hosted with?

It might be necessary to post your actual URL so we can see what kind of content the page is generating.
8 Aug 2008, 6:20 PM
#3
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

Re: Missing images in SSL pages?

DrByte:

Is the correct shared-SSL URL to your site the following?
https://secure.myserver.com/~mydomain/shop

Yes

What happens when you type in the full URL to one of your images? ie: https://secure.myserver.com/~mydomain/shop/images/no_picture.gif ?
Who are you hosted with?

I get a 404 as the images are not in the images directory. Template images are in template and items, etc. in images/whatever. So is the solution to duplicate images in all these directories?

I am hosted with Host for Web.com as a reseller - I have a VPS account and host all of my client accounts that way. I set up the shared certificate.

8 Aug 2008, 6:21 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Missing images in SSL pages?

If the host is configured in a traditional way, there should be no need to duplicate anything nor change any image paths.

What's the URL?

8 Aug 2008, 6:35 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Missing images in SSL pages?

Going to this address:

https://shared_domain/~username/shop/images/tshirts/klcap.jpg

... seems to give a 403-forbidden message.

This suggests that your server's configuration is odd in that the SSL access isn't pointing to the same folder as your non-SSL access.

If your host is running Plesk in the mode that points SSL traffic to a different folder than your non-SSL traffic, you'll have to get your host to change that setting so they both point to the same place.

Otherwise, as you suggested earlier, you'll have to duplicate your entire non-SSL folder structure into your SSL-folder ... and constantly keep it updated whenever adding new products and/or changing any files on your site.

9 Aug 2008, 4:41 AM
#6
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

Re: Missing images in SSL pages?

Thanks so much. I'll speak to my host tech support about this. I really appreciate the help! The SSL only kicks in for checkout (I think?) so it may not be a huge undertaking to duplicate images (unless of course a customer goes back to the site while still logged in?)

I am such a big fan of open source but times like this fear I am in over my head. Gotta love the daily challenge ;)

10 Aug 2008, 2:39 PM
#7
naryn avatar

naryn

New Zenner

Join Date:
Aug 2008
Posts:
5
Plugin Contributions:
0

Re: Missing images in SSL pages?

I've just been configuring my SSL now and encountered the same problem, all the images disappeared, which includes my headings so the site looks aweful!

Reading this post it suddenly clilcked why. I have **hotlink protection **turned on with my host which prevents linking to my images from other domain names. The shared certificate uses the hosts domain name.

Problem solved, for me at least, i added the url for the SSL into my hotlink protection config in my cpanel.

I finally got around to registering on the forums so i could post my experience because i've seen alot of people post their findings here.

Heres hoping its the same issue for you because its an easy fix!

naryn

10 Aug 2008, 7:21 PM
#8
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

Re: Missing images in SSL pages?

Perfect! That absolutely fixed the problem in a matter of seconds :) Thank you thank you! I simply added the certificate (secure) URL to allowed referrers and it's all good!

11 Aug 2008, 8:08 AM
#9
naryn avatar

naryn

New Zenner

Join Date:
Aug 2008
Posts:
5
Plugin Contributions:
0

Re: Missing images in SSL pages?

Excellent news! One more problem down.

:D