Skip to content

Instantly share code, notes, and snippets.

@terwey
Created September 2, 2013 19:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save terwey/6416511 to your computer and use it in GitHub Desktop.
Save terwey/6416511 to your computer and use it in GitHub Desktop.
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: https://launchpad.net/~ondrej/+archive/php5-oldstable

Here's what you do:

Inside /etc/apt/sources.list we add

deb http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu lucid main 
deb-src http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu lucid main

And then we add his key and update the system

apt-key adv --keyserver keyserver.ubuntu.com --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 http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz    # x86
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz # amd64

tar -xzvf ioncube_loaders_lin_x86.tar.gz    # x86
tar -xzvf ioncube_loaders_lin_x86-64.tar.gz # amd64
cd ioncube/
cp ioncube_loader_lin_5.4.so /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!
zend_extension=/usr/lib/php/modules/sw-engine/ioncube_loader_lin_5.4.so

Restart Apache2 and tada, Ioncube runs once more!

@shanmugam-gp
Copy link

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 keyserver.ubuntu.com --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 keyserver.ubuntu.com --recv-keys E5267A6C
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpgkeys: HTTP fetch error 7: couldn't connect to host
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

@CCO-EVA
Copy link

CCO-EVA commented Feb 22, 2016

Hi,
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 !

@poslfit
Copy link

poslfit commented Feb 24, 2016

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

@canast02
Copy link

canast02 commented Apr 4, 2016

same issue here. any solutions?

@ktamas77
Copy link

same for me as CCO-EVA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment