0

I want to install php 5 (any version, from 5.3 to 5.6) on Ubuntu 16.04 without installing Apache 2.4.

(I have installed Apache 2.2 following the suggestion from http://blog.thestateofme.com/2015/07/23/apache-2-2-on-ubuntu-14-04/ )

The answer to How do I install different (upgrade or downgrade) PHP version in still supported Ubuntu release? suggests ppa:ondrej/php and other PPAs which install Apache 2.4.

I have tried to use Precise repositories but did not succeed.

My purpose is to keep a localhost mirror of my site which runs with Apache 2.2 and PHP 5. (PHP 7.0 breaks the currently installed version of one of the plugins.)

Please help.

1 Answers1

0

The reason why apt-get is installing Apache2 because it is resolving a dependency. To satisfy that dependency first install php5-fpm before php5:

sudo apt-get -y install php5-fpm php5

This should solve the issue you are having. I got this answer from here