I need to use php5 (5.6) because I'm working on a Drupal 7 project which doesn't support php7. The problem is I recently updated to ubuntu 16.04 Xenial which seems to no longer support php5.
I tried to install it from this repo, however when It try to install it with apt I always get similar errors.
$ sudo apt-get install php5-cli
Cependant les paquets suivants le remplacent :
php7.0-cli:i386 php7.0-cli`
Which means it's obsolete. How can I install PHP 5.6 on Xenial?
php-pear
pull just CLI PHP 7.0 (php7.0-cli
) and that's harmless – oerdnj May 12 '16 at 19:05dpkg -l | awk '/php/ {printf "%s ", $2;}'
– Olaf Dietsche Jun 16 '16 at 08:19sudo apt-get install software-properties-common
– redreinard Jul 20 '16 at 22:23service apache2 restart
if using with Apache. – DustWolf Nov 05 '16 at 12:58sudo apt-get install php5.6-mysql
results in errors like:Err:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php5.6-opcache amd64 5.6.28-2+deb.sury.org~xenial+1 404 Not Found
for what seems like all deps. Digging in http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php5.6/ I can see opcache for example, but 5.6.29 not 5.6.28 as reported in my error. I have runapt-get update
, don't know what else to try. – Neek Dec 11 '16 at 12:10apt-get update
failed on mongodb-org without getting to update ondrej/php/ubuntu. I thought it was a noisy warning, not a critical failure that halted the update. Once the mongodb-org key was added, thenapt-get update
completed and myapt-get install php5.6-mysql
fetched the correct version 5.6.29. All is well. – Neek Dec 11 '16 at 12:22ppa:ondrej/php5-5.6
? It seems it doesn't see new installs withsudo apt-get install php5.6-curl
. – Eugene Feb 19 '17 at 22:27sudo add-apt-repository ppa:ondrej/apache2
if running apache2 – Anuraag Vaidya Aug 15 '18 at 04:21