Install php5 on ubuntu


Here's how to add repo and install php5.6 on Ubuntu22.

sudo add-apt-repository ppa:ondrej/php
# PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly:
sudo apt-get update
sudo apt-get install php5.6 php5.6-pgsql libapache2-mod-php5.6

Tried to make the donation. But rejected by PayPal.