ElkArte Community

Project Support => General ElkArte discussions => Topic started by: Spuds on February 17, 2014, 12:50:22 pm

Title: Minimum PHP Version
Post by: Spuds on February 17, 2014, 12:50:22 pm
Since we have not had this discussion in a while, which means a few weeks lol, I thought I'd start one again :D Way back, when 2.1 was first started it was 5.0, this somewhat quickly moved to 5.1 with no objections (I will not say why)

We maintained that requirement throughout our work on ElkArte, and the min versions remains at 5.1.2.  TBH I have not tested things under 5.1 in some time, so that's a "it should work", meaning we have not used functions or constructs, knowingly , that break that support.

Now PHP 5.1 official support ended in August of 2006, PHP 5.3 released in 2009 had its last update last year and I think it is slated to have official support end this year, so its no spring chicken itself.  I got to thinking about 1.1 and per our thoughts, maintaining the same base requirements, meaning 5.1 in 2015 which was hard to even type !

Perhaps for 1.0, we say the minimum supported version is 5.3, although it should work on 5.1 we don't necessary promote that aspect as we want to move to something newer in 1.1?  I can't believe there are many hosts that don't have 5.3 available, but the web can be a strange place.  I took a quick look at recent forum scripts and came away with this for the current versions, not sure what may be in development. Xen - 5.2.4+, pbpbb3 - 5.3.3 , wedge - 5.3, IPS - 5.2, vb5 - 5.3.0, vanilla - 5.2, mybb - 5.1

Server stats can be a bit dicey, but from here (http://w3techs.com/technologies/details/pl-php/all/all) PHP 5.x is 97.7 available, and from there the break down is:
Version 5.3 (http://w3techs.com/technologies/details/pl-php/5.3/all) 52.1%
Version 5.2 (http://w3techs.com/technologies/details/pl-php/5.2/all) 31.9%
Version 5.4 (http://w3techs.com/technologies/details/pl-php/5.4/all) 13.1%
Version 5.1 (http://w3techs.com/technologies/details/pl-php/5.1/all) .7%
Version 5.5 (http://w3techs.com/technologies/details/pl-php/5.5/all) .2%
Version 5.0 (http://w3techs.com/technologies/details/pl-php/5.0/all) .1%
Version 5.6 (http://w3techs.com/technologies/details/pl-php/5.6/all) <.1%
Version 5.7 (http://w3techs.com/technologies/details/pl-php/5.7/all) .<1%

5.1 covers 99% of the 97.7% = safe
5.2 covers 98% of the 97.7% = safe
5.3 coves 66.5% of 97.7% = some potential loss

I'm surprised at 5.2 being as high as it is, but that does not mean those sites don't also have 5.3 available as often on hosts you get a choice.  Anyway wanted to get others thoughts, some of this is future proofing things and of course the fewer versions we need to test on the better.  Right now our automated tests run on 5.3, 5.4, 5.5.
Title: Re: Minimum PHP Version
Post by: Spuds on February 17, 2014, 01:00:32 pm
Well well .. just noticed a function that we use has a min version of 5.2 ... Sooooo about that 5.1 thing :P
Title: Re: Minimum PHP Version
Post by: IchBin on February 17, 2014, 02:13:41 pm
Are we doing any kind of check to let them know in the installer if they don't meet minimum requirements?
Title: Re: Minimum PHP Version
Post by: TE on February 17, 2014, 02:27:06 pm
Quote from: Spuds – Well well .. just noticed a function that we use has a min version of 5.2 ... Sooooo about that 5.1 thing :P
Im fine with 5.2 for 1.0 since we already use it, however I'd not bump 1.0 to PHP 5.3.  It's too late for a new round of refactoring for 1.0 (Lambda, namespaces and all that). Let's push 1.0 to RC or Final ASAP and start a DEV branch for Elk 1.1 (with PHP 5.3 +)
Title: Re: Minimum PHP Version
Post by: Spuds on February 17, 2014, 02:57:03 pm
Quote from: IchBin – Are we doing any kind of check to let them know in the installer if they don't meet minimum requirements?
Yup a check is in there now for 5.1.2, but as noted this needs to change to 5.2 since that is actually the minimum.

Quote from: TE – Im fine with 5.2 for 1.0 since we already use it, however I'd not bump 1.0 to PHP 5.3.  It's too late for a new round of refactoring for 1.0 (Lambda, namespaces and all that). Let's push 1.0 to RC or Final ASAP and start a DEV branch for Elk 1.1 (with PHP 5.3 +)
Yes your right, we (ok me  O:-) ) need to stop (other than the bugs) messing with 1.0 and get a 1.1 underway.

I'm thinking the installer does a 5.2 check (kind of have to anyway) but we say 5.3 recommended in our docs ... just looking for the wiggle room to bump 1.1 to 5.3 official (lambda functions etc) without saying that should be a 2.0 since we changed the min version requirements.  Semantics I know.  5.2 also lets us rely on basic json_encode so that can be done as well (meaning remove the compat function from 1.0)
Title: Re: Minimum PHP Version
Post by: emanuele on February 17, 2014, 03:32:03 pm
Good, then:
1. 1.0 => 5.2. (any particular micro version?)
2. because of 1, drop of backward compat for json functions
3. create a development branch to start playing with 1.1
Did I miss anything?
Title: Re: Minimum PHP Version
Post by: Joshua Dickerson on February 17, 2014, 07:33:23 pm
Redhat and its variants (CentOS, Fedora, etc.) were all using 5.2.9 for a very long time. RH 5 was standard for way too long and that's what it had in its repo.

Looks good :)
Title: Re: Minimum PHP Version
Post by: Nao on February 18, 2014, 09:06:07 am
5.2 is all good. But as spuds remarked, just because 5.3 is <66% market share doesn't mean it's not available on all these servers. It can usually be installed it enabled with a setting.

I went for 5.3 in Wedge because I figured a host with 5.3+ is more likely to be up to date in all areas. It's a no brainer to me. Go for 5.2 in 1.0 because yeah it's a bit late to test, but 5.1 is pointless.
;)
Title: Re: Minimum PHP Version
Post by: inter on October 11, 2014, 11:42:58 am
>= php 5.4  8)
Title: Re: Minimum PHP Version
Post by: overscan on October 13, 2014, 05:50:35 am
Is there a maximum supported PHP version?

SMF devs seem to recommend against PHP 5.5+ for example.

My test Elkarte forum is running on NGINX + PHP 5.5 without issues, AFAIK.
Title: Re: Minimum PHP Version
Post by: emanuele on October 13, 2014, 07:32:44 am
Not that I remember. And re-reading the 5.5 to 5.6 migration guide I can't see anything that could break ElkArte.

Anyway, the current (still rather small) set of automated tests are performed using PHP 5.3, 5.4 and 5.5. But these tests cover just a small fraction of the code.
On my localhost I have 5.4.

Set PHP 5.4 as a minimum seems a quite high bar to me...
Title: Re: Minimum PHP Version
Post by: kucing on October 13, 2014, 11:35:51 am
I use Elkarte on Nginx 1.7.4, MariaDB 5.5.39, and PHP 5.6.0 without any problem yet. :)
Title: Re: Minimum PHP Version
Post by: Spuds on October 13, 2014, 05:58:49 pm
Quote from: kucing – I use Elkarte on Nginx 1.7.4, MariaDB 5.5.39, and PHP 5.6.0 without any problem yet. :)
Good to hear ! ...

I have not done any 5.6 testing at all.  I currently run Elkarte on PHP: 5.5.9 (fpm) with nginx/1.4.6 without any issues.
Title: Re: Minimum PHP Version
Post by: inter on May 20, 2017, 06:56:18 am
ElkArte 1.0.xx is working on php 7? Or php 7 not recommended for 1.0.xx? Someone has a forum on this version of PHP?
Title: Re: Minimum PHP Version
Post by: ahrasis on May 20, 2017, 09:10:55 am
I used php7.1 on EA1.0 and it's working fine and fast too. ;)
Title: Re: Minimum PHP Version
Post by: live627 on May 20, 2017, 09:06:34 pm
Quote from: ahrasis – I used php7.1 on EA1.0 and it's working fine and fast too. ;)
same here
Title: Re: Minimum PHP Version
Post by: kucing on May 20, 2017, 10:26:53 pm
Quote from: Spuds –
Quote from: kucing – I use Elkarte on Nginx 1.7.4, MariaDB 5.5.39, and PHP 5.6.0 without any problem yet. :)
Good to hear ! ...

I have not done any 5.6 testing at all.  I currently run Elkarte on PHP: 5.5.9 (fpm) with nginx/1.4.6 without any issues.
wew doesn't realize i've used elkarte since 3 years ago. :D

my current php version:
Code: [Select]
PHP 5.6.30-0+deb8u1 (cli) (built: Feb  8 2017 08:50:21) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Quote from: ahrasis – I used php7.1 on EA1.0 and it's working fine and fast too. ;)
Quote from: live627 –
Quote from: ahrasis – I used php7.1 on EA1.0 and it's working fine and fast too. ;)
same here
if you don't mind can you please list the addons currently active? i want to try to upgrade to php 7.0/7.1 but don't sure about the compatibility.

my current installed addons:
Code: [Select]
Attachment Image Resize	1.0.2
Disposable Email Check 1.0.0
ElkArte 1.0.10 patch 1.0.0
ElkArte 1.0.6 patch 1.0.0
ElkArte 1.0.7 patch 1.0.0
ElkArte 1.0.8 patch 1.0.0
ElkArte 1.0.9 patch2 1.0.0
Global Header and Footer 2.0.1
reCaptcha 1.0.0
Remove Last Edit By 1.0.0
Smush.it! 0.2
Title: Re: Minimum PHP Version
Post by: ahrasis on May 21, 2017, 01:11:41 am
Most of my own addons.
Title: Re: Minimum PHP Version
Post by: live627 on May 21, 2017, 03:24:29 am

LiveGallery1.0
SimplePortal1.0.0 Beta 1
Title: Re: Minimum PHP Version
Post by: kucing on May 21, 2017, 09:38:17 pm
Quote from: derived – IF I remember right,
they said 5.5 was going to be supported to 2020.

unfortunately no. 5.5 already EOL 2016: http://php.net/supported-versions.php

that's why i'm considering moving to 7.0/7.1