Changing the PHP CLI version in the ISPConfig panel

Discussion in 'Installation/Configuration' started by clamp2x, Feb 5, 2021.

  1. clamp2x

    clamp2x New Member

    Hi, all.

    I use several php versions on the server. My OS is Ubuntu 20.04.
    The php version of 5.6 / 7.0 / 7.1 / 7.2 / 7.3 / 7.4 / 8.0 was installed through the ondrej repository.

    FastCGI and php-fpm settings are completely completed through the "Additional PHP Version" menu in the ispconfig panel.
    All sites work fine even if I change the php version.

    I want to provide multiple versions of php-cli using jailkit.

    The default php version on my server is 7.0. (Because Ubuntu 16.04 was updated to 20.04, the default version of php is 7.0.)
    I modified the jk_init.ini file to add php-cli configuration values other than php7.0, and the contents are similar to the jk_init.ini file provided by default in ispconfig 3.2.

    I created and used a shell script file. The shell script file changed the php cli version to copy the jailkit section from a php version other than php7.0, and create a new symbolic link in the /usr/bin/php file of the jailkit user to another php version.

    However, in ispconfig 3.2 I found a jk_init.ini file that has the potential to select the php cli version, and I want to use it.

    What method should be used to link various php cli versions in the ISPConfig panel?

    And I am curious about what the bottom space does in System> System> Additional PHP Versions> PHP-FPM Settings.

  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    With the default jk_init.ini on a recent ISPConfig, just add the section you want in the jail to either your server default or site specific settings (eg. "php7_4", "php7_3", etc.). That will add the php versions, though the actual /usr/bin/php symlink will always be pointing to the same thing, and there's nothing currently in place to change that.
    ahrasis likes this.
  3. clamp2x

    clamp2x New Member

    Good. I understood. Thanks for the answer.

Share This Page