How to have all PHP versions displayed in the PHP selector for website ?

Discussion in 'Installation/Configuration' started by Keoz, Oct 31, 2016.

  1. Keoz

    Keoz Member

    Hello there,

    As a new member of this forum, I did my best to have my issue clearly exposed and my first questions easily understood.

    I successfully installed ISP Config3 on my remote VPS running with distribution Ubuntu 16.04 LTS
    I am now trying to find out why PHP5.x and PHP7 options are not displayed in the PHP dropdown menu when adding a website (under the domain tag).

    I was expecting to find them displayed because, I red in this Howto support page (see introduction text) that ISP Config3 is delivered with multi PHP versions feature, that alows to select the appropriate version depending on the website app requirements.

    This is not the case, why ?

    As adviced in another support page that guides me through ISP Config3 installation, I selected < no > when asked to configure PhpMyadmin with dbconfig-common.

    Does it mean that PhpMyadmin was somehow configured after the installation was completed ?
    If not, does it mean that I have to configure PhpMyadmin manually to enable the PHP multi versions feature ?
    And where is the ISP Confing3 config file located ?

    Hope that any one handy may help !

  2. cbj4074

    cbj4074 Member

    Very thorough first post. :) Nice work!

    Regarding multiple PHP versions: while ISPConfig does support any number of PHP versions, they are not made available via the dropdown menu in question automatically.

    To make additional PHP versions available to your various virtual-hosts, you will need to log into ISPConfig and navigate to System (top nav) -> Additional PHP Versions (side-nav).

    You can then add as many additional PHP versions as you like and are available on your system.

    If you need help with regard to the specific values to be entered there, just ask. The appropriate values will differ depending on your distribution and how you've installed the additional versions.

    Regarding phpMyAdmin, choosing "no" to configuration during installation shouldn't be too big a problem. What happens now if you browse to the /phpmyadmin URL on your server?

    Finally, regarding where ISPConfig stores its configuration files: in several places, ultimately. It really depends as to which aspect of the overall system you are referring. Many of the service configuration templates reside in /usr/local/ispconfig/server/conf, but you shouldn't edit anything there (any overrides should be placed in /usr/local/ispconfig/server/conf-custom). But if you find yourself needing to edit the configuration outside of the graphical interface that is provided at port 8080 on your server, especially this early in your usage, then you may be better off asking for help because chances are that there is a better way to effect the specific change in question.

    Hope that helps!
  3. Keoz

    Keoz Member


    Thanks for your reply that makes ISP Config3 enveironnement clearer to me !

    Assuming that my distribution is Ubuntu 16.04 with native PHP 7 version is running my remote VPS....
    I have found this HOWTOFORGE TUTO that explains how to install other PHP versions (PHP 5.6 in that case) prior to add them in the PHP selector (domain section) :

    The tuto is quite clear to me except when it comes to the following simple command lines :
    “make install“

    Are they effectively two separate command lines ?
    As I never saw before such command line type, could someone help me understand what they are here for (for what results) ?

    Keoz :)
  4. cbj4074

    cbj4074 Member

    Sure thing! Happy to help!

    That tutorial is excellent and thorough, because it explains how to wire-up an unlimited array of different PHP versions for use in ISPConfig, but it's more complicated than some of the alternatives, depending on your specific needs.

    Another drawback of compiling the PHP versions manually is that they will never be updated automatically. (And, in some cases, one may actually prefer that behavior.) But if all you need is PHP 5.6 and 7.0, and not all kinds of obscure versions thereof (for testing or versatility, perhaps), then I recommend Ondrej Surý's co-installable PHP 5.6 and 7.0 packages for Ubuntu: archive/ubuntu/php

    This approach makes it much simpler to install PHP 5.6 and 7.0 side-by-side, and both will be kept up-to-date with Ubuntu's package-manager automatically.

    If you're interested, I'd be glad to provide some instructions.

    As to the "make" and "make install" questions, yes, they are two separate commands. "make" is a widely-used software compilation tool, and almost any time you are compiling software from source, you will use it. I believe that "make" is part of the build-essentials package on Ubuntu; that package contains all of the basic tools needed to compile from source.

    "make" compiles the source code into binary format, and "make install" performs the actual installation, based on specific scripts that the software author includes with the source. These scripts may copy files throughout the system, create background services or daemons, perform initial configuration, etc.

    Hope that helps!
  5. Keoz

    Keoz Member

    Thanks :)
    The “Ondrej Surý's PPA...“ alternative should be sufficient to my needs (php 5.6 ; 7).
    But before to add this PPA to my system, do I have remove and purge the PHP 7 version that is native to my Ubuntu 16.04 installation ?

    I am asking this with the purpose to avoid concflict between the system native PHP 7 version, and the PPA PHP 7 version.

  6. cbj4074

    cbj4074 Member

    You're very welcome!

    Yes, you will want to remove and purge your previous PHP 7 packages. You may want to backup any modified configuration files that relate to PHP first, though. (And for what it's worth, I'm pretty sure that the package manager would resolve any conflicts that might occur, but it can't hurt to purge and avoid the potential in the first place.)

    PHP 7 will be the default after you install the packages from the PPA, so you will need to create an additional PHP Version in ISPConfig that points to the PHP 5.6 files.

    In ISPConfig, under System -> Additional PHP Versions, create an entry for PHP 5.6 and use:

    FastCGI Settings

    Path to the PHP FastCGI binary: /usr/bin/php-cgi5.6
    Path to the php.ini directory: /etc/php/5.6/cgi

    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

    You should then be able to select either default (PHP 7.0) or PHP 5.6 for any given website.

    I'm using PHP-FPM on my servers, and haven't tested this with other PHP configurations, but it should work for those, too.

    Let us know how it goes!
  7. Keoz

    Keoz Member


    Different PHP versions can now be selected for each new website.
    Until now I solely needed the default PHP 7 version, but I am facing new issue that could drive me to use and older PHP version.


Share This Page