Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: Ramón Cutanda on October 09, 2017, 05:13:37 PM

Title: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: Ramón Cutanda 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):

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:
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,
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: LiroyvH 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?
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: Ramón Cutanda 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):

[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,
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: Ramón Cutanda 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,
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: Kindred on April 23, 2018, 11:00:02 PM
Smf does not work with php 7.2 at this time.
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: Ramón Cutanda on April 23, 2018, 11:09:08 PM
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,
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: Ramón Cutanda on April 23, 2018, 11:29:35 PM
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... :-(

Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: 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.
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: Ramón Cutanda on April 23, 2018, 11:39:38 PM
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,
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: shawnb61 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. 
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: vbgamer45 on April 23, 2018, 11:46:45 PM
You can do search on all files folders. If linux use grep
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: shawnb61 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. 
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: Ramón Cutanda 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!
Title: Re: SSL not working after upgrading to PHP 7 with SMF 2.0.14
Post by: Ramón Cutanda on August 29, 2018, 05:50:23 AM
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 (https://www.simplemachines.org/community/index.php?topic=561926.0))


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