Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ubuntu 10.04 Lucid upgrade PHP 5.3.2 to PHP 5.4.19-1 (+ Ioncube)

PHP 5.4 woes on Ubuntu 10.04 Lucid

So I was having an issue on a VPS I rent that it was on Ubuntu 10.04 LTS. They seem to have a different idea of what LTS means then what seems reasonable. Having your packages available for 5 years isn't something I'm waiting for, I can also still get Debian Buzz with no issues so that's not an argument. What I want is -support- for -updates- on an -existing- platform. Luckily, I don't have to travel far to the Ubuntu team to slap some sense in them because luckily people run their own PPA's that do compile software for existing OS installs.

However, I kept running into an issue that most posts and gists kept referring to PPA's that no longer supported Ubuntu 10.04 Lucid by now... Found a few PPA's but they named their packages like php54 and libapache2-mod-php54 which causes Ubuntu 10.04 Lucid with Plesk installed to throw you a giant headache cause it wants to remove Plesk specific packages (cause it's only compatible with libapache2-mod-php5 and php5)

Getting to it

Turns out however, one person still maintains a PPA with correct naming for the packages which makes for a smooth upgrade. Thank you ondrej! You can find the PPA info here:

Here's what you do:

Inside /etc/apt/sources.list we add

deb lucid main 
deb-src lucid main

And then we add his key and update the system

apt-key adv --keyserver --recv-keys E5267A6C
apt-get update

Now, we can get the new PHP5.4!

apt-get install libapache2-mod-php5

I recommend you compare your old configs with the new one, then it's a matter of restarting Apache2 and you're golden!

But... Ioncube?

Yes you can still has.

wget    # x86
wget # amd64

tar -xzvf ioncube_loaders_lin_x86.tar.gz    # x86
tar -xzvf ioncube_loaders_lin_x86-64.tar.gz # amd64
cd ioncube/
cp /usr/lib/php/modules/sw-engine/ # This depends on your setup, Plesk is usually like this

Then in the file: /etc/php5/conf.d/00-ioncube-loader-5.3.ini

# comment out the old one!

Restart Apache2 and tada, Ioncube runs once more!


This comment has been minimized.

Copy link

@shanmugam-gp shanmugam-gp commented Apr 10, 2014

When I was trying your procedure i got the following error in ubuntu10.04 LTS

Please help me to resolve

root@shanmugam-desktop:~# apt-key adv --keyserver --recv-keys E5267A6C
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver --recv-keys E5267A6C
gpg: requesting key E5267A6C from hkp server
gpgkeys: HTTP fetch error 7: couldn't connect to host
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

This comment has been minimized.

Copy link

@CCO-EVA CCO-EVA commented Feb 22, 2016

I'm on Ubuntu 10.4 with php 5.3.2
When i run all commands i have no errors but the install libapache2-mod-php5 result is that it's already the most recent version available.
The php -v tells me i'm still in 5.3.2

Any idea why i can't upgrade to 5.4 ?
Thanks by advance !


This comment has been minimized.

Copy link

@poslfit poslfit commented Feb 24, 2016

I'm having the same problem as CCO-EVA.


This comment has been minimized.

Copy link

@canast02 canast02 commented Apr 4, 2016

same issue here. any solutions?


This comment has been minimized.

Copy link

@ktamas77 ktamas77 commented May 20, 2016

same for me as CCO-EVA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.