Post by vsi » Tue May 26, 2015 11:29 am

I got SSL certificate installed, and modified admin/config.php from http:// to https:// and enable SSL on admin/setting/server. However, when I refresh the page, all images are disappeared (I guess the links lost). There is something wrong when I enable the SSL? I have many images, and can not upload again for each products. Please give me advice.

Thanks

vsi
Newbie

Posts

Joined
Wed Aug 07, 2013 11:21 pm

Post by tdaubs » Wed May 27, 2015 5:06 am

Can you provide a URL so we can take a look?

Where are the images not showing? On the backend? On the front-end? Both?

Image
Opencart Support . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by vsi » Wed May 27, 2015 11:10 am

Thanks for your reply. I am sorry I can not provide a URL because now the site is normal (but NOT SSL). I can not pause the site for a minute, so I turned off the SSL.
I tried on the backend (modified admin/config.php from http:// to https://), here is the screen shot. You will see the problem. I also tried on front-end for very shot time to check up, and it is the same (NO images shown). All other function are fine.
I think the links are broken, but I do not know the reason and how to fix it (it is impossible to change the products one-by-one. I have tons of products). Before solved the problem, I will disable the SSL.
Thanks for your advice.

Attachments


vsi
Newbie

Posts

Joined
Wed Aug 07, 2013 11:21 pm

Post by tdaubs » Wed May 27, 2015 5:48 pm

In the config.php file in the admin folder, do you have a couple lines of code similar to the following?

Code: Select all

// HTTPS
define('HTTPS_SERVER', 'https://www.yourwebsite.com/admin/');
define('HTTPS_CATALOG', 'https://www.yourwebsite.com/');
If not, try adding it.

Image
Opencart Support . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by vsi » Wed May 27, 2015 8:35 pm

Thanks tdaubs. Yes, I did it.

Right now, what I did on my site is:

1. SSL installed by godaddy
2. Enabled SSL on backend (admin/setting/server)
3. Keep config.php with http://
// HTTPS
define('HTTPS_SERVER', 'http://www.yourwebsite.com/admin/');
define('HTTPS_CATALOG', 'http://www.yourwebsite.com/');

If I change to https:// (which on your comments)
// HTTPS
define('HTTPS_SERVER', 'https://www.yourwebsite.com/admin/');
define('HTTPS_CATALOG', 'https://www.yourwebsite.com/');

Then all the imagines disappeared as above.

vsi
Newbie

Posts

Joined
Wed Aug 07, 2013 11:21 pm

Post by tdaubs » Thu May 28, 2015 2:38 am

You should still have a config for non-ssl too.

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.yourwebsite.com/admin/');
define('HTTP_CATALOG', 'http://www.yourwebsite.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.yourwebsite.com/admin/');
define('HTTPS_CATALOG', 'https://www.yourwebsite.com/');
Which version of Opencart are you using?

Image
Opencart Support . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by vsi » Thu May 28, 2015 8:24 pm

I am using Opencart 1.5.6.4.

Here is the part of my admin/config.php for current setting. Please give me more advice.

<?php
// BACKEND CONFIG

// HTTP
define('HTTP_SERVER', 'http://yourwebsite.com/admin/');
define('HTTP_CATALOG', 'http://yourwebsite.com/');
define('HTTP_IMAGE', 'http://yourwebsite.com/image/');
define('HTTP_ADMIN', 'http://yourwebsite.com/admin/');

// HTTPS
define('HTTPS_SERVER', 'http://yourwebsite.com/admin/');
define('HTTPS_IMAGE', 'http://yourwebsite.com/image/');

vsi
Newbie

Posts

Joined
Wed Aug 07, 2013 11:21 pm

Post by tdaubs » Fri May 29, 2015 12:31 am

In the https section, try adding

Code: Select all

define('HTTPS_CATALOG', 'https://yourwebsite.com/');
Also, adjust the other values under https to go through https. :)

Image
Opencart Support . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by vsi » Fri May 29, 2015 11:38 am

thank you very much. You helped me to solve the problem. Now my site is on SSL.

Best wishes

vsi
Newbie

Posts

Joined
Wed Aug 07, 2013 11:21 pm
Who is online

Users browsing this forum: No registered users and 12 guests