Score:-1

Whether there is any compatibility issue for PHP 5.6 and Apache 2.4.51 on Ubuntu 18.04/20.04?

cn flag

I am replicating an environment. The original environment contains Ubuntu 14.04, PHP 5.6 and Apache 2.4.51

Since 14.04 (and 16.04) is out of life, following are the possible Ubuntu OS that I can use:

  1. 18.04

  2. 20.04

I also know that PHP 7+ is supported on Ubuntu 16.04 onwards.

My question is that - whether there is any compatibility issue for PHP 5.6 and Apache 2.4.51 on each of the above Ubuntu OS versions?

I am asking because this link mentions it is not safe to use an older package on a newer OS: Install PHP 5.3 on Ubuntu 13.04

Note: I know how to install the php 5.6 via ppa:ondrej/php and Apache 2.4.51. This question is not about how to install them. Just about compatibility with these recent OS versions.

cn flag
Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/131111/discussion-on-question-by-variable-whether-there-is-any-compatibility-issue-for).
Score:2
in flag

Yes it is safe and you should not have any compatibilty issues when installing the version from ppa:ondrej.

sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/apache2
sudo apt update
sudo apt install php5.6  apache2

While in general, you should be careful with PPAs, this is one of the few PPAs which I would recommend without a doubt.

Ondřej Surý is maintainer of the official PHP packages in Debian (and thus Ubuntu). He quite knows what he's doing.

This is what he says about himself on his website:

I am a Debian Developer since year 2000, and I have been packaging PHP for Debian since PHP 5. [...] the PHP packages in my Ubuntu PPA and Debian DPA matches the official packages in Debian. Basically I am saying that you can’t get any closer than that.


Regarding your concerns due to this answer: This is an 8 year old question. Back then, there was no PPA like this, and a downgrade was done manually (or with some script from the internet). You will install php5.6 alongside any other version you have. It is true, that this might lead to dependency issues. But with ondrej's PPA, you won't have the issues, as the PPA will also deliver these dependencies.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.