PhpSwitcher and PHP 7.2

  • ATTENTION:

    This is deprecated because of PhpSwitcher version 5.0.0 release!

    Hi there,


    as I saw that there is already a php 7.2 version I just wanted to ask if it is planned to be included in phpswitcher?
    (Do not need it currently just wanted to know it)

    Edited once, last by UncleSam ().

  • Hi there,


    as I saw that there is already a php 7.2 version I just wanted to ask if it is planned to be included in phpswitcher?
    (Do not need it currently just wanted to know it)

    Of course, that is planned. But, I'm so busy ATM with next i-MSCP Serie and there are so many changes in the core API that I'll sync all plugins first with the new API before releasing any new version.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • We have installed and run php7.2.x from Ondřej Surý (deb.sury.org) and adding manually to imscp..

    You meant that you have installed PHP 7.2 through ondrey Sury repository and added it to the Php Switcher plugin interface, right? if so, i confirm that this should also works like this.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Have seen that to check the PHP binary regex is also used, and adapted that he also works with the long debian version string.



    Code
    1. root@nc1:~# php-cgi7.2 -v
    2. PHP 7.2.3-1+0~20180306120016.19+stretch~1.gbp81bf3b (cgi-fcgi) (built: Mar 6 2018 12:00:19)

    This string there


    Greetings
    Thomas

  • but IIRC it didnt work out of the box through and I needed to change the regex of the version check a bit to it wont stumble upon the rest of the ver string.


    I'll ask DT to send me the files to I can look for the Regex and post it so you can include it @Nuxwin


    Edit:
    this is the Regex:


    /PHP\s+(\d+)\.(\d+)\.(\d+)\S*\s+\(cgi-fcgi\)/


    you can try that this works on https://regex101.com/


    Edit 2:


    Regex for the FPM:
    /PHP\s+(\d+)\.(\d+)\.(\d+)\S*\s+\(fpm-fcgi\)/


    a nice feature would obviously also be to for example autodetect whether there are other PHPs installed and add them, or to just grab sury's PHP releases instead of needing to add stuff manually.

    asperger inside(tm)

    Edited 5 times, last by My1 ().

  • a nice feature would obviously also be to for example autodetect whether there are other PHPs installed and add them, or to just grab sury's PHP releases instead of needing to add stuff manually.

    A summarize of planned changes:


    Starting with i-MSCP version 1.6.0, All PHP versions from the Ondřej Surý repository will be installed by the i-MSCP installer, even those which are not selected through the installer (see https://github.com/i-MSCP/imsc…debian-like-distributions for further reading).


    About the next PhpSwitcher version


    By default, and when possible, the plugin will prefer make use of PHP versions as provided by Ondřej Surý repository. So, the following command

    Shell-Script
    1. perl php_compiler --auto-setup 5.6 7.0 7.1 7.2

    will make use of PHP 5.6, 7.0, 7.1 and 7.2 from the Ondřej Surý repository. These versions will be made automatically available for use by customers without having to register them manually through the PhpSwitcher plugin interface.


    Note: Maybe we should rename the php_compiler script to php_manager to better reflect that change (no compilation tasks involved).

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • will this thing also be prepared to accept newer versions easily (e.g. that someone can quickly use 7.3 when it comes without waiting for PHPswitcher to be updated) without needing an update of the PHP switcher or IMSCP?


    like for example that the thing could browse the available PHP versions and the user can quickly select anything to install when he wants (possibly even Betas/RCs for testing).

    Note: Maybe we should rename the php_compiler script to php_manager to better reflect that change (no compilation tasks involved).

    good Idea.

    asperger inside(tm)

  • will this thing also be prepared to accept newer versions easily (e.g. that someone can quickly use 7.3 when it comes without waiting for PHPswitcher to be updated) without needing an update of the PHP switcher or IMSCP?

    The plugin will accept PHP version layout as implemented by Debian. Debian make use of a fixed layout for multi PHP versions support. So yes, with the new PhpSwitcher plugin version, you should be able to just rerun the php_manager --auto-setup <version> command to add the new version and make it available for customers. I'll see if I can add a trigger through the PhpSwitcher GUI for auto discovering of new versions.


    like for example that the thing could browse the available PHP versions and the user can quickly select anything to install when he wants (possibly even Betas/RCs for testing).

    That is another story. You should be able to make use of Beta/RC versions if these are packaged by Ondřej Surý. Don't forget that for the self-compiled versions, we need provide a set of patches for each PHP versions as the default PHP installation layout doesn't fit good for Debian (Multiarch support, FTBFS issues and so on...). You also surely know the issues with patches: They need sometime (to not say often) be refreshed... This is due to fact that a fix provided by a patch can be integrated to PHP upstream source, or that there was too many changes in upstream source, making the patches unapplyable...

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206