Pictures don't appear after SSL

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
Farofylakas
Registered User
Posts: 138
Joined: Tue Oct 09, 2012 10:00 am

Pictures don't appear after SSL

Post by Farofylakas » Sat Feb 09, 2019 8:50 pm

Hi everyone.

Most pictures don't appear in my forum any more. Here's an example page. I think it happend after I installed SSL.

It's only pictures stored on our server.

When I edit the post and try to change the http to https I get a
"It was not possible to determine the dimensions of the image. Please verify that the URL you entered is correct."

I just updated to the latest version of phpbb.

Can anyone suggest what's wrong and how to solve it? Can it be a question of redirection?

Or else, should I run an SQL query and replace all http://mydomain with https://mydomain ?

Thank you

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2920
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Pictures don't appear after SSL

Post by thecoalman » Sun Feb 10, 2019 2:47 am

Farofylakas wrote:
Sat Feb 09, 2019 8:50 pm

When I edit the post and try to change the http to https I get a
"It was not possible to determine the dimensions of the image. Please verify that the URL you entered is correct."
WWW is considered subdomain and you need a SSL certificate that will support each subdomain if you are using any. Yours does not support WWW.

You are redirecting http://www.yourdomain.com to https://www.yourdomain.com and you can't do that without a valid certificate for WWW. That is why the images do not appear to begin with and the error from phpBB. Also note a redirection from https://www.yourdomain.com to https://yourdomain.com will also fail so you will proabaly want to get support for the WWW because anyone typing WWW manually will get certificate error page. As it is now you can only redirect http://www.yourdomain.com and http://yourdomain.com to https://yourdomain.com.

Of course removing the WWW in the post will also fix it because there is no redirection occurring

Or else, should I run an SQL query and replace all http://mydomain with https://mydomain ?
Backup first. If you open phpmyadmin from your hosting control panel open the table phpbb_posts. Once the table is open on the top click the search tab, on that tab find the button search and replace below the tabs. Type in http://www.yourdomain.com in the find text box and then type in https://yourdomain.com in the replace text box. In the drop down box select the column "post_text". Click the go button and it should give you preview of the changes. Click go again and the operation will be carried out.

Be aware there may be unforeseen issues with this but they should me minor if any. For example a post like this one becomes nonsensical.

User avatar
EA117
Registered User
Posts: 278
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Pictures don't appear after SSL

Post by EA117 » Sun Feb 10, 2019 5:04 pm

thecoalman wrote:
Sun Feb 10, 2019 2:47 am
Also note a redirection from https://www.yourdomain.com to https://yourdomain.com will also fail...
Wow, I wouldn't have suspected that. But I guess that makes sense, if we're talking about the user agent stopping and warning the user about an unsecure "there is a certificate problem" connection before following the redirect. (Or is it actually some other or deeper technical issue?) Sounds like this would be a common issue site owners would be confronted with.

I've seen where Let's Encrypt does say they will let you request a single certificate with multiple domain names (Subject Alternative Name, SAN) covered by the single certificate. If whatever method OP is using to obtain the Let's Encrypt certificate allows employing that feature, maybe that would be an "easy" option to allow their single certificate to cover both mydomain.com and www.mydomain.com.

Let's Encrypt does of course also support issuing a wildcard certificate, but the technical hurdles are higher for obtaining and renewing that type of certificate. And perhaps "overkill" for only wanting to address the "www" issue, though it would allow for having other subdomains besides "www" in the future.

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2920
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Pictures don't appear after SSL

Post by thecoalman » Mon Feb 11, 2019 12:38 am

EA117 wrote:
Sun Feb 10, 2019 5:04 pm
Wow, I wouldn't have suspected that. But I guess that makes sense, if we're talking about the user agent stopping and warning the user about an unsecure "there is a certificate problem" connection before following the redirect.
The first request is for the certificate and no data is sent until after the negotiation . AFAIK the redirect would be encrypted anyway. There is very little information not encrypted unless it's required like the IP's.

User avatar
Farofylakas
Registered User
Posts: 138
Joined: Tue Oct 09, 2012 10:00 am

Re: Pictures don't appear after SSL

Post by Farofylakas » Mon Feb 11, 2019 11:58 am

Ok. The problem is taken care of and pictures do appear once again.

thanks! :)

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: canonknipser and 27 guests