Feature: Debian 12(PHP 8.1) compatibility with ISPC

Discussion in 'ISPConfig 3 Priority Support' started by Petar, Feb 9, 2023.

  1. Petar

    Petar Member HowtoForge Supporter

    I would like to try ISPC with native PHP 8.1 environment, because of composer's and Drupal 10 minimum requirements.
    I have two paths to achieve this: either to dist-upgrade a perfect auto install or to start from scratch with a min Debian test 12.
    Have you been testing ISPC with any of this and should i continue or there are some known drawbacks?

    Thanks in advance for your time, support and communication
    BR
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I have not tested on Debian 12 yet and I think that ISPConfig should generally work as Ubuntu 22.04 uses PHP 8.1 as well. The main problem will be that ISPConfig is not able to detect Debian 12 yet and therefore will use PHP 7.4 paths, so either a config template for the new version should be added first or you could try to trick the installer by altering the file /etc/os-release temporarily and change it to:

    Code:
    PRETTY_NAME="Ubuntu 22.04 LTS"
    NAME="Ubuntu"
    VERSION_ID="22.04"
    VERSION="22.04 (Jammy Jellyfish)"
    VERSION_CODENAME=jammy
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    UBUNTU_CODENAME=jammy
    this should be enough to make the ISPConfig installer (not auto installer script) believe its Ubuntu 22.04 and to use matching defaults for PHP 8.1.
     
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You can also add PHP 8.1 as additional PHP version for that site, so that site uses PHP 8.1, while the server runs on a stable Debian release. See https://www.howtoforge.com/ispconfig-php-debian/ for a guide on installing additional versions on a existing setup. If you are installing a new setup, the autoinstaller can take care of it for you.
     
  4. Petar

    Petar Member HowtoForge Supporter

    Thanks Th0m, but i've already tried that with no success, because even that you can trick Drupal that its working on a 8.1 environment, you cannot do the same for composer, and i should add --ignore-platform-reqs to every request for upgrading or installing modules to Drupal and also i wouldn't be sure that the version which it is installing will be compatible with 8.1... hence i'm trying and testing the upper mentioned solution from till and will let you and all of our colleagues about the procedure, stability and drawbacks if any...
     
  5. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    It's not "tricking", you can actually make a site use only PHP 8.1 and nothing else.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    As @Thom mentioned, using Debian 12 is nice if you do it because you like to test it. But for live sites or systems you rely on to be working, just install PHP 8.1 as additional PHP version on Debian stable and select it for that site, there is no need to trick Drupal at all as this site runs PHP 8.1 in the same way it would happen on a system where it is sued as the default version. And for commandline PHP, you can do this by using chrooted SSH users in ISPConfig and adding PHP 8.1 to the chroot, so neither drupa nor composer would even know that there might be a older PHP version on the system as default or for other sites.
     
    Th0m likes this.

Share This Page