Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Acorn on July 15, 2020, 11:10:35 AM

Title: PHP version
Post by: Acorn on July 15, 2020, 11:10:35 AM
Hi

I have a forum that is version 2.0.13  (I know it needs updating, but that is not possible for the moment).  I need to know which PHP versions this will be OK    - I am currently on 5.6, and the site is running very slowly.  I have 7.0, 7.1, 7.2, and 7.3 available to me.

Many thanks.
Title: Re: PHP version
Post by: shadav on July 15, 2020, 11:53:35 AM
upgrading from 2.0.13 to 2.0.17 is easy, just install the patches and you are done....
https://wiki.simplemachines.org/smf/Patching

I believe you can use 7.1, not entirely sure....
for 2.0.15 and above can use 7.2

but I doubt that will help with the site being slow....
Title: Re: PHP version
Post by: d3vcho on July 15, 2020, 12:02:08 PM
From https://wiki.simplemachines.org/smf/SMF2.0:Requirements_and_recommendations

QuotePHP 4.1.0 or higher
Versions of SMF below 2.0.7 will not work on PHP 5.5. If you use PHP 5.5 it is necessary to use SMF 2.0.7 or greater.
Versions of SMF from 2.0.16 onwards require a version of PHP between 5.3 and 7.3. If you use PHP 5.3 or lower, it is necessary to use SMF 2.0.13 or lower or SMF 2.0.16 or higher. This is because 2.0.14 and 2.0.15 do not support PHP 5.3. PHP 7.4 is not supported by SMF at this time.
Title: Re: PHP version
Post by: Kindred on July 15, 2020, 12:07:06 PM
I don't think that 2.0.13 will work properly on PHP 7.0 (it may run, but I think it generates errors/warnings)
Title: Re: PHP version
Post by: Acorn on July 15, 2020, 12:30:04 PM
Ideally I would update the software (which I understand is very quick - is that right?) but I am a little concerned that some add-ons might not work.

I think the real problem is with the host, but when we tried to migrate earlier this year we had problems with some coding that had been added prior to my involvement with the site. 

We have a lot to do, but my priority at the moment is to do anything possible to speed the site up and stop all the 500 errors.

I guess that if I change the PHP version to 7.0 and it generates errors I can always go back to 5.6 again.
Title: Re: PHP version
Post by: Kindred on July 15, 2020, 12:59:15 PM
if you PATCH update, then there should be no problem with existing mods at 7.0.
(although, on consideration, several mods MIGHT need a mysql to mysqli update -- but that's related to the php version, not the updating of SMF.)
Title: Re: PHP version
Post by: Arantor on July 15, 2020, 01:03:02 PM
Quote from: Kindred on July 15, 2020, 12:59:15 PM
if you PATCH update, then there should be no problem with existing mods at 7.0.
(although, on consideration, several mods MIGHT need a mysql to mysqli update -- but that's related to the php version, not the updating of SMF.)

Well, it sort of is the updating of SMF; the underlying functions for $smcFunc['db_query'] etc. were changed and if the mods aren't strictly using $smcFunc consistently, the update of SMF to cope with PHP changes will break them.
Title: Re: PHP version
Post by: Acorn on July 15, 2020, 02:00:40 PM
Now that's why I'm scared of updating!  I'm fine with html and css, but php... scares me silly.
Title: Re: PHP version
Post by: Sir Osis of Liver on July 15, 2020, 09:20:26 PM
You can unistall the mods, update to 2.0.17 and php 7, then reinstall current versions of the mods.
Title: Re: PHP version
Post by: I B D on July 16, 2020, 08:19:52 AM
also depending on the mods newer versions maybe available of the mods so may negate alot of the potential worries.  However ALWAYS backup your fles so if something does go awry then you can restore them easily.  That way  any custom coding you will still have and you can then apply manually if needbe