Php – Why does this package (ppa:ondrej/php5, it’s PHP 5.5) break the apache2 installation

apache-2.2PHPubuntu-12.04

Problem

Currently this package (ppa:ondrej/php5) is quite popular for installing the latest version of PHP 5.5. I've worked quite much with it, and everything ran smoothy, on several (dev) servers. But from today (?) this breaks the apache2 installation (it empties the /etc/apache2/sites-available/default file). This is reproduceable.

Way to reproduce (on naked Ubuntu 64 12.04 LTS)

// basic installs
sudo apt-get update
sudo apt-get install apache2
sudo apt-get install php5

Apache is fine, nano /etc/apache2/sites-available/default has valid content now

// getting PHP 5.5.x
sudo apt-get install python-software-properties (for add-apt-repository)
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get install php5
// php -v shows successful install of PHP 5.5.x now

Apache is broken, nano /etc/apache2/sites-available/default is empty now

Question

Why does this happen ? According to https://launchpad.net/~ondrej/+archive/php5 there were no changes in the last few days.

Best Answer

This PPA now comes with an upgrade to Apache 2.4

And the config files of Apache 2.4 have significant differences, including sites-available/sites-enable filename and syntax differences.

The problem you are experiencing is exactly because the config filename change.

Related Topic