1

I need to use an older version of php for my project (I know that it isn't supported). I have tried adding PPA ppa:ondrej/php , but it doesn't work - It couldn't find the package. Is there another way? Simple

sudo apt-get install php5

doesn't work either; it returns no installation candidate

Zanna
  • 70,465

1 Answers1

5

After adding the repository http://ppa.launchpad.net/ondrej/php/ubuntu you have to update your repositories. Please try this:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.5

You can use php5.6 instead..

  • 4
    This no longer works. 5.5 has been removed from the repo. – jowan sebastian Jun 10 '17 at 11:12
  • 8
    The PHP 5.5 have been removed from ppa:ondrej/php, the lowest version is php5.6. Note that there are differences between php5.5 and php5.6, so you need to test your code. There is a major difference with object serialisation. – Milos Jun 28 '17 at 08:32
  • Great (NOT)! A good reason not to use other people's repos. Better to build it yourself then you don't need to rely on other people judgements of 'suitability for purpose'!!! So now what? – gone Mar 05 '20 at 15:46