Elgg on PHP7

As you know PHP7 was released already.
Has anyone tried to upgrade a production?
How does work Elgg with it?

Any advice about all Elgg versions: 1.8.*, 1.12.*, 2.0.*

  • I still think that PDO should work. so I  ignore the installation error and forcefully moved to next step and it really worked. there was some crash on last step which I could not read as no error log is coming.

    but then  I show the site was up. so I went to mysql and added  admin there.

    and now everything is fine.   Ideally this is fine as ELGG has implimented support to PDO. 

  • At least one developer is actively building a 2.0 site on 7 and we're fixing bugs as he finds them. I'll try to put out 2.0.2 later today with some of those fixes.

  • anyone got any more feedback on elgg 2.1.x with PHP7?

  • +1

    ELGG works great on PHP 7. I have two servers.

    Server 1:

    • PHP 7 + Apache 2.2 + NGINX 1.11 = It works great. No problem.

    Server 2:

    • PHP7 + NGINX + NGINX (PROXY) = Problems. But this problems only configuration PHP 7 + NGINX or PHP 7 + NGINX + NGINX (PROXY).

    Eventually, Apache + PHP 7 = no problems.

  • well, i strapped on my shiny PHP7 helmet and pressed 'go'. i am now testing elgg 2.1.2 in PHP7.0.7 in fedora 23 and so far all looks well. the only problem was that i wanted to run php5.6 alongside php7 using 'software collections' as recommended by remi collett. unfortunately, that didn't work for me as the version of PHP7 didn't come with an /etc/ folder and associated files, so i found it easier to just dump all versions and install a standard update to PHP7.

    i haven't done any timed tests but visually i can see that the pages are loading significantly quicker. :)

    when i read through the page on incompatibilities between versions here: http://php.net/manual/en/migration70.incompatible.php

    i found that there is a particular one to do with the direction PHP is evaluated having been reversed, but the text is not well written and i don't really understand what is being suggested as a solution for compatibility:

     

    Changes to the handling of indirect variables, properties, and methods

     

    Indirect access to variables, properties, and methods will now be evaluated strictly in left-to-right order, as opposed to the previous mix of special cases. The table below shows how the order of evaluation has changed.

    Old and new evaluation of indirect expressions  
    Expression PHP 5 interpretation PHP 7 interpretation
    $$foo['bar']['baz'] ${$foo['bar']['baz']} ($$foo)['bar']['baz']
    $foo->$bar['baz'] $foo->{$bar['baz']} ($foo->$bar)['baz']
    $foo->$bar['baz']() $foo->{$bar['baz']}() ($foo->$bar)['baz']()
    Foo::$bar['baz']() Foo::{$bar['baz']}()

    (Foo::$bar)['baz']()

     

    Code that used the old right-to-left evaluation order must be rewritten to explicitly use that evaluation order with curly braces (see the above middle column). This will make the code both forwards compatible with PHP 7.x and backwards compatible with PHP 5.x.

  • minor issues found so far:

    several plugins need lines to convert boolean variables to be arrays due to PHP7's stricter typing for function input variables (hypeCategories + Widget Manager routing functions).

  • i just upgraded my live server to php7 after putting in a few fixes (4). the result is that the site is now faster than ever - with all pages being quicker to load. the slowest page previously was the activity page and it now loads initial readable content in around 2 seconds and is totally loaded in under 5 seconds. before upgrading to PHP7 it was at least 1-2 seconds slower.