How to install php 5.5.9 on ubuntu 16.04

Suresh Kumar picture Suresh Kumar · Jul 29, 2017 · Viewed 15.4k times · Source

I tried with a PPA - ppa:ondrej/php but it says

PLEASE DON'T USE PHP 5.4 OR PHP 5.5. The PHP 5.5 and later are no longer supported with security updates, therefore they are not included in this repository.

Note: I understand it is not preferred to use PHP5.5+ still i wanted to install. Is there is any ppa is available with php5.5.9 with all supported extensions?

Answer

Chris picture Chris · Jul 29, 2017

Best option

As I stated in comments I very strongly advise you to use a supported version of PHP. Using outdated versions of PHP means being susceptible to all kinds of security vulnerabilities. Upgrading your application to work with PHP 5.6 may not be very much work.

Much, much worse option

If you absolutely must use PHP 5.5 (which I don't recommend), you should use the latest release (5.5.38), not 5.5.9. There should not be any breaking changes in 5.5.38 vs. 5.5.9; you'll just get a whole bunch of bugfixes and security patches.

Since PHP 5.5 has reached end-of-life you won't receive any updates to it via any channel, so there isn't much value in installing via PPA vs. building from source. I agree with the stance taken by ppa:ondrej/php not to provide PHP 5.5 anymore, and other PPA providers are likely to go down the same path.

If you're confident that you know the risks of using an ancient version of PHP, and accept them (please don't!), you can download the source code for PHP 5.5.38 from PHP.net and then build it.

PHP 5.5.9

Seriously, I beg you, don't use this version of PHP. If using PHP 5.5.38 in 2017 is crazy (it is!), using PHP 5.5.9 is complete insanity.