I want to install php5.4 on Ubuntu 16.04 (Xenial). I know this is deprecated, but I came across an old application that I need to check before updating the code for compatibility with php7.
When I do the following:
apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5-oldstable
sudo apt-get update
sudo apt-get install -y php5
and check with php -v, it shows installed php5.6.
This is the result of php -v:
PHP 5.6.28-1+deb.sury.org~xenial+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.5.0rc1, Copyright (c) 2002-2016, by Derick Rethans
(The steps follow as http://tecadmin.net/install-php5-on-ubuntu/ )
Is there a way to force php5.4 to be installed instead of letting it select any php5 package it finds?
I tried with apt-get install -y php5.4, but this does not work.
. , , php7. - , , , ( !). , , , ! !