Setup PHP 7.2 or 7.3 for only one Customer

  • Hi,


    one of my Customers need a new PHP Version for his project.


    I buyed PHPSwitcher but i diddnt realize that i can not use it with >7.1.


    Is there any Way to use 7.2 or 7.3 from the Repository (Ubuntu 14.04) and setup it manualy?


    Thanks for your replys!

  • Is there any Way to use 7.2 or 7.3 from the Repository (Ubuntu 14.04) and setup it manualy?

    Support for both PHP 7.2, 7.3 will be provided in next i-MSCP release and/or next PhpSwitcher plugin version.

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

  • You can install these versions on a Debian system, then manually add them with PhpSwitcher, pointing to the system pool, php-fpm.conf etc. Before you add them you need to hack the _checkPhpVersionData in backend/PhpSwitcher.pm and change the regular expression so it accepts your binary versions.


    Code
    1. if ( $rs || $stdout !~ /PHP\s+(\d+)\.(\d+)\.(\d+)\s+\(cgi-fcgi\)/ ) {
    2. error( sprintf( "`%s' doesn't looks like a PHP FastCGI binary", $cgiBinaryPath ));
    3. return;
    4. }

    to

    Code
    1. if ( $rs || $stdout !~ /PHP\s+(\d+)\.(\d+)\.(\d+).*\s+\(cgi-fcgi\)/ ) {
    2. error( sprintf( "`%s' doesn't looks like a PHP FastCGI binary", $cgiBinaryPath ));
    3. return;
    4. }


    and


    Code
    1. if ( $rs || $stdout !~ /PHP\s+(\d+)\.(\d+)\.(\d+)\s+\(fpm-fcgi\)/ ) {
    2. error( sprintf( "`%s' doesn't looks like a PHP-FPM binary", $fpmBinaryPath ));
    3. return;
    4. }

    to

    Code
    1. if ( $rs || $stdout !~ /PHP\s+(\d+)\.(\d+)\.(\d+).*\s+\(fpm-fcgi\)/ ) {
    2. error( sprintf( "`%s' doesn't looks like a PHP-FPM binary", $fpmBinaryPath ));
    3. return;
    4. }


    You can also just change your default version under /etc/imscp/php/php.data

  • siggi , Thank you verry much!

    This might be the solution for my Problem!


    But how can i manually add the Version when its installed?

    Is it possible for you to describe it a little more detailed?


    Again THANKS!

  • Once you did hacked the code, then installed both fpm and cgi for the Php versions you want to use, that is, once you have installed the debian packages, you need to connect as administrator to the control panel, then on the setting side, you'll find a phpswitcher plugin section that make you able to register new PHP versions manually.

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