Advertisement:

Author Topic: SSL not working after upgrading to PHP 7 with SMF 2.0.14  (Read 4138 times)

Offline videoed

  • Jr. Member
  • **
  • Posts: 154
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
SSL not working after upgrading to PHP 7 with SMF 2.0.14
« on: October 09, 2017, 05:13:37 PM »
Hi,

After upgrading my server to PHP 7 or PHP 7.1 I get the following error (Firefox):

Code: [Select]
Secure Connection Failed

The connection to the server was reset while the page was loading.

    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.

This is my dedicated sever configuration:
  • CentOS Linux release 7.4.1708 with DirectAdmin 2.0.0 (rev: 1734)
  • MySQL 5.6.36
  • Four SMF forums. Three of them using 2.0.14 and one SMF 2.1 Beta 3 (for test purposes). One of them is heavily modified, but others only use one or two mods and the SMF 2.1 is a plain "vanilla" SMF install.
  • One Comodo SSL certificate
  • Let’s Encrypt certificates for all the other SMF sites.
  • I am using the "Image proxy" and the following .htaccess
Code: [Select]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]

I have searched the forum but I have not been able to find any information associated to SSL and PHP 7. All my other scripts on the server seem to run fine with PHP 7, so I guess it is something exclusively related to SMF. When I downgrade the server to PHP 5.6 everything runs fine again.

Any help to solve this issue will be greatly appreciated.

Kind regards,

Offline CoreISP

  • Server Admin
  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,315
  • Gender: Male
  • CoreISP.net
    • liroyvh on LinkedIn
    • @liroyvh on Twitter
    • CoreISP Corporation :: WebHosting, Dedicated Servers, and more!
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #1 on: October 10, 2017, 05:59:22 AM »
More likely to be an issue with PHP 7.1 config then.
What shows up in the server error logs?
- CoreISP.net Corporation -
  WebHosting, Colocation, Domain Registration & Network Services
- DedicatedBox.us Servers -
  Low priced Servers in a high-quality Network, the place for all your (advanced) server needs.
  We specialize in hosting big boards. Contact us!

((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

Offline videoed

  • Jr. Member
  • **
  • Posts: 154
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #2 on: October 10, 2017, 10:58:37 PM »
Hello CoreISP,

Thank you so much for your interest in this matter. After cleaning the sever error log just before upgrade PHP 5.6 to PHP 7.1, to make sure I was not confused with something else, this is the only error registered (multiple times):

Code: [Select]
[Wed Oct 11 04:53:14.030633 2017] [core:notice] [pid 27349] AH00052: child pid 28418 exit signal Segmentation fault (11)
After cleaning the error logs of each of the domains, they stay clean after installing PHP 7.1. The log with the activity is the main server error log.

Thanks once again.

Bests,

Offline videoed

  • Jr. Member
  • **
  • Posts: 154
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #3 on: April 23, 2018, 10:50:59 PM »
It has been a while, but I just wanted to update saying that PHP 7.2 solved the problem. I have not changed anything whatsoever. This afternoon I tried PHP 7.0 and it didn't work. I tried 7.1 and it didn't work. I tried PHP 7.2 and... voilà. Everything running as expected.

Bests,

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 56,259
  • Gender: Male
    • Kindred-999 on GitHub
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #4 on: April 23, 2018, 11:00:02 PM »
Smf does not work with php 7.2 at this time.
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 videoed

  • Jr. Member
  • **
  • Posts: 154
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #5 on: April 23, 2018, 11:09:08 PM »
Smf does not work with php 7.2 at this time.

Well... it seems to be running in all of my forums. I will test it during the next days to see if I find anything unusual.

https://videoedicion.org/info.php

https://videoedicion.org/

http://alberta.org.es/

http://concordeperformancesystem.org/forum/

Bests,

Offline videoed

  • Jr. Member
  • **
  • Posts: 154
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #6 on: April 23, 2018, 11:29:35 PM »
Smf does not work with php 7.2 at this time.

Some boards are working as expected. However, in some other boards I get this error:

Code: [Select]
Call to undefined function mysql_query()
So I guess I will need to wait a little longer... :-(


Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 20,128
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #7 on: April 23, 2018, 11:36:48 PM »
mysql_query was killed in PHP 7.0. most likely that is a mod issue or a part of your site you have not updated yet.
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 videoed

  • Jr. Member
  • **
  • Posts: 154
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #8 on: April 23, 2018, 11:39:38 PM »
mysql_query was killed in PHP 7.0. most likely that is a mod issue or a part of your site you have not updated yet.

I have the same problem even with "fresh" installs of SMF and in different domains. But thanks for the clue. I will try to connect that with my SSL certificates.

Thank you,

Offline shawnb61

  • Support Specialist
  • Sr. Member
  • *
  • Posts: 762
    • sbulen on GitHub
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #9 on: April 23, 2018, 11:46:32 PM »
I think it's even more basic than that...

I think 2.0.14 cut over to mysqli calls instead of mysql.  I don't believe a proper 2.0.14 install would ever make a mysql_query call. 

I suspect the upgrade had issues. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 20,128
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #10 on: April 23, 2018, 11:46:45 PM »
You can do search on all files folders. If linux use grep
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 shawnb61

  • Support Specialist
  • Sr. Member
  • *
  • Posts: 762
    • sbulen on GitHub
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #11 on: April 23, 2018, 11:54:39 PM »
Minor correction to my note above:  From 2.0.14 on, if mysqli is detected, it is used.  If not, it will fall back to mysql calls.  Also, as vbgamer45 points out, mysql calls are deprecated in php7+.

So... 

I think you need to either install mysqli, or, go back to php 5.6. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline videoed

  • Jr. Member
  • **
  • Posts: 154
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
« Reply #12 on: April 23, 2018, 11:57:44 PM »
Thank you so much for your detailed support. I will definitely try mysqli.

I trully appreciate your help. Even if I have still not solved my upgrade issue, you really made my day  :D . Finally some hope after so long!