Plesk 18: Install PHP 5.6 on Ubuntu 20.04

Need to prepare a website platform, to work with a tender for the enhancement.

It only supports PHP 5.6.

However, Plesk 18 doesn’t have it on Ubuntu 20.04 originally.

Require to install it with Ondřej Surý’s PPA (thanks).

How-to

# add-apt-repository ppa:ondrej/php

 

# apt update

 

# apt-get install php5.6-fpm

# apt-get install php5.6-cgi

# apt-get install php5.6-mysql php5.6-gd php5.6-mbstring php5.6-odbc php5.6-xml php5.6-xmlrpc php5.6-soap

 

 # update-alternatives --config php

 

# /usr/local/psa/bin/php_handler --add -displayname fpm-56 -path /usr/bin/php-cgi5.6 -phpini /etc/php/5.6/fpm/php.ini  -type fpm -clipath /usr/bin/php5.6 -poold /etc/php/5.6/fpm/pool.d -service php5.6-fpm

 

The new PHP handler with the id "fdc7f13c9a35a0e1bb91296c83cd588c1b30dc2d" was successfully registered.



PHP 7.0
# add-apt-repository ppa:ondrej/php

# apt update

# apt-get install php7.0-fpm

# apt-get install php7.0-cgi

# apt-get install php7.0-mysql php7.0-gd php7.0-mbstring php7.0-odbc php7.0-xml php7.0-xmlrpc php7.0-soap php7.0-curl

# update-alternatives --config php

# /usr/local/psa/bin/php_handler --add -displayname fpm-70 -path /usr/bin/php-cgi7.0 -phpini /etc/php/7.0/fpm/php.ini  -type fpm -clipath /usr/bin/php7.0 -poold /etc/php/7.0/fpm/pool.d -service php7.0-fpm

The new PHP handler with the id "ab588a79d6351858fdd0df4d5458f231a4488673" was successfully registered.




References



Update
  • +PHP 7.0, 2024-Jan-11