Under ISPConfig 3 you can have more than one PHP release available for your websites. Not every project runs perfectly in all versions, there is still out there some software that needs PHP 5.

I will show how easy is to add new PHP versions. This example installs PHP 7.2. UPDATE: PHP 7.3 and 7.4 RPMs are out, the same process applies to them.

Update: This also applies to RHEL 9 distributions.

Requisites

  • Root access
  • CentOS/Alma/Rocky 6, 7, 8, 9
  • Admin access to your ISPConfig3

Installing the PHP

I use the REMI repository. Add the repository and when you are ready, type: yum install php72-php php72-php-xml php72-php-imap php72-php-pecl-apcu-bc php72-php-opcache php72-php-mysqlnd php72-php-pecl-uploadprogress php72-php-gd php72-php-pecl-mcrypt php72-php-pecl-memcached php72-php-cli php72-php-pecl-yaml php72-php-odbc php72-php-pecl-memcache php72-php-fpm php72-php-intl

For newer PHP versions change the 72 to the right one.

These are only some useful packages, you will need to add more PHP modules as you need them.

Configuring the ISPConfig

Go to System -> Additional PHP Version menu and add as follows:

  • Server: your servername
  • Client: leave it black for everybody
  • PHP Name: the label

ispconfig add php fastcgi settings

  • Path to the PHP FastCGI binary: /opt/remi/php72/root/usr/bin/php-cgi
  • Path to the php.ini directory: /etc/opt/remi/php72

ispconfig add php php fpm settings

  • Path to the PHP-FRPM init script: php72-php-fpm
  • Path to the php.ini directory: /etc/opt/remi/php72
  • Path to the PHP-FRPM pool directory: /etc/opt/remi/php72/php-fpm.d

Change the 72 to the right version you are using. Check the configuration o your PHP-FPM as by default they may listen to the same port. If you are planning to use FPM, this could be an issue.

After this, it will be available in your system, but we haven't finished yet.

Configuring the New PHP

All the configuration files are under /etc/opt/remi. Take note of the following:

  • If you are going to use PHP-FPM, you will need to edit the www.conf file and change the port number, as by default port 9000/TCP is already used by the default PHP installation from the Linux distribution. New RPMs use Unix sockets.
  • If you have done any tuning, such as raising the timeouts or the max payloads you will need to put those changes there.

You are all set. Happy hosting.

Good luck!

";