Multiple PHP Versions

Discussion in 'ISPConfig 3 Priority Support' started by BobGeorge, Apr 13, 2019.

  1. BobGeorge

    BobGeorge Member HowtoForge Supporter

    I notice that on Ubuntu that the PHP packages are numbered, like "php7.0-fpm", "php7.2-fpm" and "php7.3-fpm".

    Does this mean that I can safely have multiple PHP versions installed that won't conflict with each other on the same machine through these packages?

    I've looked at the "howtoforge" tutorials for multiple PHP versions, but these compile PHP from source. I'd rather use packages, if possible, both because I'll automatically get any security updates to the packages that way and it's just easier to do.

    (My servers are configured to only use "FPM" and "HHVM" anyway. As I had to disable "mod_php" when I switched the Apache MPM to "mpm_event", as "mpm_fork" isn't compatible with it. Then I made "FPM" the default and removed the incompatible ones from ISPConfig, so they can't be selected by users.)

    Any advice or warnings of "gotchas" that folks could give me about this?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Yes you can. But safely nees a bit qualification here. It does work reliably and safely, but only if done right, which means following the instructions carefully and not messing up.
    You maybe did not have found this Tutorial: https://www.howtoforge.com/tutorial...fig-3-from-debian-packages-on-debian-8-and-9/
    Similar system works for Ubuntu, the extra repository where PHP packagages are installed from has also packages for Ubuntu.
    One gotcha is to set the Default PHP version back to what comes with your Ubuntu version. ISPConfig works with the PHP that comes with the operating system, using any other PHP version is not supported.
     
  3. BobGeorge

    BobGeorge Member HowtoForge Supporter

    Yes, you're right. I never found that particular tutorial and it is exactly the one I was looking for.

    I think I'll test the procedure on my laptop first, where it doesn't matter so much if I screw it up, to make sure I'm doing it right.

    Thanks.
     
  4. kwickcut

    kwickcut Member

    this is what i used
    https://www.howtoforge.com/tutorial/perfect-server-ubuntu-with-nginx-and-ispconfig-3/2/
    8.1 Additional PHP Versions
    Starting with ISPConfig 3.0.5, it is possible to have multiple PHP versions on one server (selectable through ISPConfig) which can be run through PHP-FPM. To learn how to build additional PHP versions (PHP-FPM) and how to configure ISPConfig, please check this tutorial: How To Use Multiple PHP Versions (PHP-FPM & FastCGI) With ISPConfig 3 (Ubuntu 12.10) (works for Ubuntu 16.04 as well).
     

Share This Page