Advertisement:

Author Topic: ssl for images  (Read 1053 times)

Offline Jeff B

  • Full Member
  • ***
  • Posts: 419
ssl for images
« on: December 05, 2019, 01:26:37 PM »
Wasn't quite sure what to name this topic.  Here is my situation. I am about to install a secure server certificate. I think I have a handle on what I need to do in regards to the forum itself, but I have another issue.  Our forum has been around going on 20 yrs. From the beginning we required images to be in a bridged coppermine gallery to share in posts. We do not allow offsite images (THANK GOD THINK PHOTOBUCKET)  So, all images posted on our site are on our domain.  The file paths are all within our domain. How can I handle this once I enable the SSL so that all these http addresses don't show up as unsecure content to the browser?  .htaccess? Some other way.  We are talking well over a quarter million photos.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,852
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: ssl for images
« Reply #1 on: December 05, 2019, 01:33:38 PM »
You can do a mysql find and replace on the messages table in the body column to change the link url from http://imagepath to https://imagepath
Always backup your database first

Code: [Select]
update smf_messages set body = REPLACE(body, "http://imagepath", "https://imagepath");
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,965
Re: ssl for images
« Reply #2 on: December 05, 2019, 01:37:48 PM »
cant you just enable the image proxy and let it handle it? then you don't need to modify anything.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,980
    • StoryBB/StoryBB on GitHub
Re: ssl for images
« Reply #3 on: December 05, 2019, 01:38:33 PM »
cant you just enable the image proxy and let it handle it? then you don't need to modify anything.

For the size and scale, fixing it is likely better.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,852
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: ssl for images
« Reply #4 on: December 05, 2019, 02:16:04 PM »
Also more efficient in the long run instead of storing duplicate images and causing proxy.php to be called for the image requests
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Jeff B

  • Full Member
  • ***
  • Posts: 419
Re: ssl for images
« Reply #5 on: December 05, 2019, 02:21:36 PM »
Yes, the proxy images the way I understand it seems like the forum would be taxed pretty hard, since there are probably photos is almost every topic page.

Is phpmyadmin sufficient to make a call like that for a forum with going on 2 million posts?  Or is there a better way?


Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,852
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: ssl for images
« Reply #6 on: December 05, 2019, 02:30:24 PM »
Should be since the query should just execute. I would put site on maintenance mode just to prevent slowdowns when you run it.

If not command line mysql
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,572
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: ssl for images
« Reply #7 on: December 05, 2019, 02:44:29 PM »
Assuming the SSL cert also covers the domain where the gallery resides. 

In Coppermine, click "Config", and under general settings, change the URL of your Coppermine gallery folder to from http to https

Offline Jeff B

  • Full Member
  • ***
  • Posts: 419
Re: ssl for images
« Reply #8 on: December 05, 2019, 09:52:36 PM »
Thank you! If okay, I'd like to keep this topic open until I get this completed? It might not happen until after the holidays.

Offline Jeff B

  • Full Member
  • ***
  • Posts: 419
Re: ssl for images
« Reply #9 on: December 12, 2019, 09:53:36 AM »
I've started this project. I have not addressed the gallery photos as of yet as I am trying to sort out all the other non-secure content first.  I am getting this in the firefox console and I cannot find the source of the conflict. any ideas on where to look? It is the last two instances I have on the board index page, on which I started.

Loading mixed (insecure) display content “https://mywebsite/board/uploaded_avatars/avatar_10176_1396655806.jpeg” on a secure pagescript.js:491:2
Loading mixed (insecure) display content “https://mywebsite/board/uploaded_avatars/avatar_10176_1396655806.jpeg” on a secure pagescript.js:491:2

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,752
  • Gender: Male
    • Kindred-999 on GitHub
Re: ssl for images
« Reply #10 on: December 12, 2019, 09:56:25 AM »
that would be some user's avatar....
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,965
Re: ssl for images
« Reply #11 on: December 12, 2019, 09:58:11 AM »
if the image proxy is enabled, it should handle that for you.

basically it is all the same issue, you either manually convert the URLs and enable the image proxy or you just enable the image proxy.

Offline Jeff B

  • Full Member
  • ***
  • Posts: 419
Re: ssl for images
« Reply #12 on: December 12, 2019, 10:35:48 AM »
I enabled the image proxy with no love.  This actually shows up on all pages, not just the index. Maybe something in an old template edit somewhere?

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,965
Re: ssl for images
« Reply #13 on: December 12, 2019, 11:10:08 AM »
link to where it is happening?

Offline Jeff B

  • Full Member
  • ***
  • Posts: 419
Re: ssl for images
« Reply #14 on: December 12, 2019, 11:12:31 AM »
pm sent

Offline Jeff B

  • Full Member
  • ***
  • Posts: 419
Re: ssl for images
« Reply #15 on: December 12, 2019, 11:14:57 AM »
Another note,  I just went and checked, it only occurs when logged in. If you are not logged in, the page is clear.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,965
Re: ssl for images
« Reply #16 on: December 12, 2019, 11:21:53 AM »
then we need the link provided in this topic so anyone that has time can assist you, along with a test log in so we can actually see the issue.

Offline Jeff B

  • Full Member
  • ***
  • Posts: 419
Re: ssl for images
« Reply #17 on: December 12, 2019, 11:32:50 AM »
More testing.  I logged into the test account and it doesn't do it. However, I changed the test account to an admin account, and then it occurs, but the error points to a different avatar. There should be NO avatars displayed on the page.  https://www.forestryforum.com/board/index.php

I would need to provide an admin account.

Offline Jeff B

  • Full Member
  • ***
  • Posts: 419
Re: ssl for images
« Reply #18 on: December 12, 2019, 12:00:21 PM »
I can provide an admin account but I got a warning about sending a pm unless asked to specifically to do so.

Offline Jeff B

  • Full Member
  • ***
  • Posts: 419
Re: ssl for images
« Reply #19 on: December 12, 2019, 03:11:14 PM »
Okay, it does not have to be an admin account. I went back to the test account and added an avatar to the account. It then started throwing the content error for that login.  I deleted the avatar, but the error now remains.  Who can I send the test account login to?