User Rating: 5 / 5

Star Active Star Active Star Active Star Active Star Active
 
php-7-ispconfig-3.png

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 RPM's are out, the same process applies to them.

Requisites

  • Root access
  • CentOS 6 or 7
  • 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 PHP 7.3 or 7.4 you just change the prefix, for example for PHP 7.3 php73-php and for PHP 7.4 do php74-php.

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:

ispconfig add php name

  • 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

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.
  • If you have done any tuning, such as upraising the timeouts or the max payloads you will need to put those changes there.

You are all set. Happy hosting.

Good luck!

 

blog comments powered by Disqus

About

Read about IT, Migration, Business, Money, Marketing and other subjects.

Some subjects: FusionPBX, FreeSWITCH, Linux, Security, Canada, Cryptocurrency, Trading.