News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

php 7.1 going away soon

Started by a10, September 08, 2019, 08:58:41 AM

Previous topic - Next topic

Plantje

Have people tried running 2.0.15 on PHP 7.3? What issues do you run into?

Arantor

Same issues that 7.2 presents, any bbc mod spews into the logs, and some badly written code breaks (but it would also under 7.1 and 7.2)

SpacePhoenix

Quote from: Arantor on October 26, 2019, 11:00:49 AM
the replacement for create_function didn't exist until PHP 5.3 anyway.

5.3 came out in 2009! That's plenty of time for a replacement for create_function to have been dealt with, even with all coders being volunteers. A quick search of 2.0.15 shows 196 occurrences, many of them are repeats/duplicates, when you take that into account, there's probably about 50 unique occurrences. create_function was depreciated in 5.2 which came out in 2006! Frankly there's no excuse for that not having been dealt with a fair way before 2.0.15, even when considering that SMF is coded by volunteers

Arantor

Yes, yes, we know that. We also know that in 2009 when 2.0 RC2 first came out, a lot of hosts were still very firmly using 4.3. Even now, I know of production sites still running on 5.5 that for one reason or another cannot be upgraded, so it's really not that simple.

They're also not duplicates; every single bbc definition has its own create_function instance. Also, no, it wasn't deprecated in 5.2, because it couldn't have been deprecated until its replacement came out the following version. It has been deprecated in 7.2, which is only out in 2017.

Part of the problem is that people like you demonise the SMF team - if they spend time on 2.0, they get blasted for not finishing 2.1, and if they spend time on 2.1, they get blasted for not sorting this for 2.0.

It's that kind of attitude that has led a number of people not to contribute to development, and for those few brave souls that do, they have to do it in their evenings and weekends around their day job.

SpacePhoenix

Quote from: Arantor on October 27, 2019, 08:39:20 AM
Yes, yes, we know that. We also know that in 2009 when 2.0 RC2 first came out, a lot of hosts were still very firmly using 4.3. Even now, I know of production sites still running on 5.5 that for one reason or another cannot be upgraded, so it's really not that simple.

They're also not duplicates; every single bbc definition has its own create_function instance. Also, no, it wasn't deprecated in 5.2, because it couldn't have been deprecated until its replacement came out the following version. It has been deprecated in 7.2, which is only out in 2017.

WRONG! https://www.php.net/manual/en/functions.anonymous.php They've been available since 5.3, it even says on the manual page for create_function that you should be using anonymous functions

Part of the problem is that people like you demonise the SMF team - if they spend time on 2.0, they get blasted for not finishing 2.1, and if they spend time on 2.1, they get blasted for not sorting this for 2.0.

It's that kind of attitude that has led a number of people not to contribute to development, and for those few brave souls that do, they have to do it in their evenings and weekends around their day job.

The PHP function phpversion (https://www.php.net/manual/en/function.phpversion.php) has been around since PHP4! It can be used to determine which version of PHP is in use, if it returns that the version is a new enough version with an if-else block either the newer or legacy code could be run.

That's 10 years that there's been to fix that, frankly that should have been dealt with years ago, before 2.1 was even started. Version 1.0 was active at the time. Only being able to do it during evenings and weekends is no excuse when the solution has been available for about 10 years

Arantor

QuoteThe PHP function phpversion (https://www.php.net/manual/en/function.phpversion.php) has been around since PHP4! It can be used to determine which version of PHP is in use, if it returns that the version is a new enough version with an if-else block either the newer or legacy code could be run.

Short of having 2 different Subs.php files (since a 5.3+ file will fail to compile on 5.2 if it uses closures), no, you actually can't. It really doesn't work like that. You have to have made the decision before even loading Subs.php and thus two different versions of the file are required. Which means double the work for all the modders, which means less modding gets done. It's also how to make a system even more fragile.

Thank you for telling me how I should have done my job, really appreciate the feedback.

P.S. You have reaffirmed every decision about why I removed my mods, means I don't have to worry about maintaining them since they'll all be terrible and incompetent, good to know.

Kindred

SpacePhoenix - You think you can do better?

SMF 2.0.x is BSD licensed. GO ahead and fork it and show us how much better you would make it.

Until then -- please either knock it off or go away.
Сл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."

Arantor

I'm also speaking as someone that has led two of the forks that have attempted the most significant amounts of changes to SMF in the last 10 years, too. I get, better than possibly anyone, how much effort it *actually* is to effect change.

Sitting on the sideline moaning about it, that's easy... getting off of one's backside to do something about it, considerably harder.

SpacePhoenix

Quote from: Kindred on October 27, 2019, 10:33:22 AM
SMF 2.0.x is BSD licensed. GO ahead and fork it and show us how much better you would make it.

Why would I fork a piece of software that is in real need of a complete re-write from the group up using at the very least OOP and ideally also MVC? ::)

Arantor

So why are you still using SMF (assuming you're using it because you're complaining about it) when OMG it's so terrible?

efk

I hope that you guys will make things ready, we regulars are little lacking of support since we need knowledge to fix things on our own, but for my time here I can say that you are doing great job and it would be disaster change like this to affect on entire project. I can understand hosts moving from php5 to php 7.1, but doing more than that should mean hosting have to fix problems caused to every individual customer who request or to return money since some damage is done with forced change.

Offtopic
In last 2 days I read some post related with new bug discovered and there was word about UTF-8 on 2.1, and on 2.0 is another standard for which some text/data is lost over time. Can't find that topic, but is it possible to make it for 2.0.16? I believe that thing happened on forums to me, where I was sure to have some text written but could not find it.

Aleksi "Lex" Kilpinen

UTF-8 is just a different character set, should not in any way cause anything to be lost. I've been using UTF-8 with 2.0 for years....
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Arantor

Quote from: Aleksi "Lex" Kilpinen on October 28, 2019, 01:00:46 AM
UTF-8 is just a different character set, should not in any way cause anything to be lost. I've been using UTF-8 with 2.0 for years....

If only that were entirely true. MySQL's UTF-8 implementation is deliberately incomplete to the point where it has two and 2.0's implementation does some very tricky stuff to repack the extended range stuff into the otherwise incomplete version.

SpacePhoenix

Quote from: Arantor on October 28, 2019, 03:39:44 AM
Quote from: Aleksi "Lex" Kilpinen on October 28, 2019, 01:00:46 AM
UTF-8 is just a different character set, should not in any way cause anything to be lost. I've been using UTF-8 with 2.0 for years....

If only that were entirely true. MySQL's UTF-8 implementation is deliberately incomplete to the point where it has two and 2.0's implementation does some very tricky stuff to repack the extended range stuff into the otherwise incomplete version.

That's what utf8mb4 is for: https://medium.com/@adamhooper/in-mysql-never-use-utf8-use-utf8mb4-11761243e434

Arantor

Yes, yes, I know. But SMF still supports versions of MySQL that predate mb4 support. I'm the guy who made it work anyhow by doing some magic to convert 4 byte characters into entities to fit in the 3 byte space.

Skhilled

Will 2.0.16 affect themes? If so, how?

Arantor

Quote from: Skhilled on October 28, 2019, 06:24:12 AM
Will 2.0.16 affect themes? If so, how?

I haven't looked in a while but the login thing should be fixed once and for all (with no theme changes needed) and maybe new footer links to accommodate the new GDPR features.

Skhilled


nidec

Quote from: lurkalot on October 18, 2019, 12:51:35 PM
Quote from: nidec on October 18, 2019, 10:54:34 AM
Quote from: lurkalot on October 17, 2019, 06:40:31 PM
Quote from: nidec on October 17, 2019, 05:19:24 PM
My site, notthenoobs.com,  is built on 2.0.15 and I signed up with Gray Web hosting.  This is on php 7.3. Is that likely to be a problem?

7.1 is the highest version 2.0.15 supports.  You should be able to select 7.1 in your cPanel.

There is no option to change it. I went with Gray Webhost because they were recommended on here as being experts on SMF, so Im surprised thats not available

I'm on Gray Webhost too, and only just gone to 7.1 from 5.6 in the last week or two.  ;)

Found it and changed it to 5.6
Had to search Multiphp in the seach box, but it came up and was an easy swop.
When the next version 2.0.16 comes out and I upgrade, wil I have to swop this back?

Arantor

Quote from: SpacePhoenix on October 27, 2019, 06:29:02 PM
Quote from: Kindred on October 27, 2019, 10:33:22 AM
SMF 2.0.x is BSD licensed. GO ahead and fork it and show us how much better you would make it.

Why would I fork a piece of software that is in real need of a complete re-write from the group up using at the very least OOP and ideally also MVC? ::)

This is also the question I should have asked myself 2 years ago. I guess when I last started, I wanted to preserve the spirit of what brought me here. But it's time to move on in that respect.

Advertisement: