Install PHP 5.6 in Plesk Obsidian 18.0.33 on Ubuntu Ubuntu 20.04 LTS
Posted: Sat May 27, 2023 8:18 pm
PHP 5 was released on July 14 2004 and official security support for PHP 5.6 ended on 31 December 2018.
But, if you manage a large number of clients whose sites cannot be quickly updated to a new PHP version, installing PHP 5.6 is one of the options to update servers without breaking old sites.
Add PPA repository and update package list
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
Install PHP 5.6
sudo apt-get install php5.6
Install basic PHP extensions
sudo apt-get install php5.6-gd php5.6-mysql php5.6-xml php5.6-cli php5.6-json php5.6-common php5.6-mbstring php5.6-opcache php5.6-readline php5.6-xsl php5.6-bcmath php5.6-mbstring php5.6-soap php5.6-xml php5.6-zip
Install CGI for Fast CGI support
sudo apt install php5.6-cgi
Register PHP 5.6 Handler in Plesk
/usr/local/psa/bin/php_handler --add
-displayname php5.6-os
-path /usr/bin/php-cgi5.6
-phpini /etc/php/5.6/apache2/php.ini
-clipath /usr/bin/php5.6
-type fastcgi
-id php5.6-so
The new PHP handler with the id “php5.6-os” was successfully registered.
Credit: https://randomtechbits.com/install-php- ... 20-04-lts/
But, if you manage a large number of clients whose sites cannot be quickly updated to a new PHP version, installing PHP 5.6 is one of the options to update servers without breaking old sites.
Add PPA repository and update package list
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
Install PHP 5.6
sudo apt-get install php5.6
Install basic PHP extensions
sudo apt-get install php5.6-gd php5.6-mysql php5.6-xml php5.6-cli php5.6-json php5.6-common php5.6-mbstring php5.6-opcache php5.6-readline php5.6-xsl php5.6-bcmath php5.6-mbstring php5.6-soap php5.6-xml php5.6-zip
Install CGI for Fast CGI support
sudo apt install php5.6-cgi
Register PHP 5.6 Handler in Plesk
/usr/local/psa/bin/php_handler --add
-displayname php5.6-os
-path /usr/bin/php-cgi5.6
-phpini /etc/php/5.6/apache2/php.ini
-clipath /usr/bin/php5.6
-type fastcgi
-id php5.6-so
The new PHP handler with the id “php5.6-os” was successfully registered.
Credit: https://randomtechbits.com/install-php- ... 20-04-lts/