ISPConfig 3.1 – Additional PHP Versions Tutorial

Fast tutorial how to install into ISPConfig 3.1 Additional PHP Versions without compiling from sources.

Note: There is official tutorial on howtoforge.com but from my point of view is so complicated and each time you need to compile new PHP version or additional PHP extensions. That’s the reason why repository is the best choice and super easy to setup in this tutorial instead of compiling PHP from sources.

This tutorial is suitable for ISPConfig 3.1 running on Ubuntu 16.04 with PHP-FPM. But in result it can be done on any Debian/Ubuntu version. I will install additional PHP 5.6 version for ISPConfig from repository.

  • First we need to add PHP repository maintained by Ondřej Surý

  • After we will install PHP5.6 and most common modules

  • Now we will add Additional PHP version 5.6
    • Login as Admin into ISPConfig and navigate to System > Additional PHP Versions > Add new PHP version
    • Choose correct server where you’ve installed PHP5.6 and set PHP Name like: PHP5.6
    • Switch to PHP-FPM Settings
      • Path to the PHP-FPM init script: /etc/init.d/php5.6-fpm
      • Path to the php.ini directory: /etc/php/5.6/fpm
      • Path to the PHP-FPM pool directory: /etc/php/5.6/fpm/pool.d
      • Save
  • Now you can choose any web page and select your PHP5.6 version.
  1. Thanks a bunch for writing this. Spent hours trying to apply additional php versions following other official and non official ISPconfig guides without success. This made it sooo easy! Have now got 5.6, 7.0, 7.1, 7.2 & 7.3 working perfectly. All setup in just a few minutes! My system is Ubuntu 16.04.1 LTS with ISPConfig 3.1.12 running on EC2 AWS.

  2. Hi MyKE , thanks for the post.
    Even if it looks very easy, I cannot make my ISPConfig use different php versions on different sites.
    I have both php7.0 and php5.6 installed, and, in the system, which is a debian 9.3, the default php is 5.6:

    ls -lh /etc/alternatives/php
    lrwxrwxrwx 1 root root 15 Feb 4 16:15 /etc/alternatives/php -> /usr/bin/php5.6

    but nonetheless sites use the latest php available (7.0)

    I’ve added the php-fpm5.6 as you described, checking that all the files and path exist, but with little luck.

    Any suggestion on how to fix the situation?

    Thank you
    davide

    • Hi davide,

      As you mentioned you use Debian 9, did you use correct repository for Debian (DPA repository)? You need to install php-fpm version.

      Maybe debian packages gives binary and configuration files to different paths than ubuntu (/etc/init.d/phpX.Y-fpm;/etc/php/X.Y/fpm).

      MyKE

  3. Hi again
    I still cannot use different php versions. No matter what I set for each website, only default php version is taken into consideration by the different websites.

    The files
    /etc/init.d/php5.6-fpm
    /etc/php/5.6/fpm
    etc/php/5.6/fpm/pool.d

    do exist.
    I tried different versions (5.6 7.0 7.2) but none of them worked.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: