I have installed LAMPP about a year ago, I remember that it was very easy because I just had to download a tar.gz file and extracted it to the /opt/
folder it always worked great. Now I want to upgrade from PHP 5.4
to the 5.5
version. I do I update only Php without having to re-install LAMPP again?

- 431
- 2
- 6
- 12
1 Answers
Edit: Just read the title to the end and noticed you're on 12.10! Upgrade! Upgrade immediately! You are literally years behind on security updates.
Actually, it's probably easier to just do a fresh install of 14.04 (a LTS version, see below) than upgrading to 13.04 (dead), 13.10 (dead) and then to 14.04. And not meaning to scare you, but there have been some pretty serious security issues that you haven't been protected against; your install could already be exploited.
The below was written assuming you were using 14.04.
For standard PHP installations, I would recommend just hopping to the ondrej/php5
PPA. This is a repository maintained by Ondřej Surý (a Debian PHP packager) and this PPA tracks the Debian PHP team's work. It should be as good as what you get from Ubuntu directly.
sudo apt install python-software-properties
sudo add-apt-repository ppa:ondrej/php5
sudo apt update
sudo apt install php5
That said, if you're using LAMPP, all bets are off. LAMPP is a completely unneccessary and separate packaging of components that I would never suggest be used for production. Use Ubuntu's (or Ondřej's) version. It's maintained and updated in a predictable way.
There's also a comment on your question that you upgrade to a later release of Ubuntu. If you're on 14.10, sure that dies in July, but if you're on 14.04, well, 14.04 is a Long Term Support release and is maintained up to 2019. 15.04 barely gets you to 2016. That means fewer upgrades, less maintenance for you, and a lot less testing.
So my final suggestion:
Stay onInstall an LTS release- Install the proper LAMP stack that Ubuntu ships
- Use Ondřej's PPA to hop to the latest stable PHP version (5.5 now).

- 293,335
-
So I have followed the steps above to install php5 from ondrej ppa, but when I enter the
sudo apt-get install php5
it again installs php5.4.6 Could this be because I am still using Ubuntu12.10? – Yuran Pereira May 26 '15 at 14:54 -
Get:1 http://old-releases.ubuntu.com/ubuntu/ quantal-security/main php5-common amd64 5.4.6-1ubuntu1.8
– Yuran Pereira May 26 '15 at 14:54 -
That above, is the first output I get after I run apt-get install – Yuran Pereira May 26 '15 at 14:55
-
@Yuran. Yes. The PPA only supports supported releases (which you haven't been on for a long time). Upgrade. – Oli May 26 '15 at 15:31
5.4
to the5.5
version." have a look at this. If you didn't, also consider updating toPHP 5
, sincePHP 4
is EOL since about 7 years – kos May 26 '15 at 11:59