SSL not working after upgrading to PHP 7 with SMF 2.0.14

Started by Ramón Cutanda, October 09, 2017, 05:13:37 PM

Previous topic - Next topic

Ramón Cutanda

Hi,

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

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
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,

LiroyvH

More likely to be an issue with PHP 7.1 config then.
What shows up in the server error logs?
((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.

Ramón Cutanda

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):

[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,

Ramón Cutanda

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,

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Ramón Cutanda

Quote from: Kindred on April 23, 2018, 11:00:02 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,

Ramón Cutanda

Quote from: Kindred on April 23, 2018, 11:00:02 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:

Call to undefined function mysql_query()

So I guess I will need to wait a little longer... :-(


vbgamer45

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

Ramón Cutanda

Quote from: vbgamer45 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.

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,

shawnb61

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

vbgamer45

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

shawnb61

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

Ramón Cutanda

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!

Ramón Cutanda

In the end, it all turned out to be related to a MessageIndex.template.php custom template. There was an error "Access denied for user ''@'localhost' (using password: NO)" for each subforum (more info here)


So, finally, I am running now PHP 7.2 with SMF 2.0.15.
Thank you so much for all your time and support :-)



Advertisement: