PHP 5.4 is now obsolete on Debian

While doing an update, I got this fun message:

[[code]]czo0NjI6XCIKcGhwNSAoNS40LjQ1LTArZGViN3UyKSB3aGVlenktc2VjdXJpdHk7IHVyZ2VuY3k9bWVkaXVtCgoqIFBIUCA1LjQgaGF7WyYqJl19cyByZWFjaGVkIGVuZC1vZi1saWZlIG9uIDE0IFNlcCAyMDE1IGFuZCBhcyBhIHJlc3VsdCB0aGVyZQp3aWxsIGJlIG5vIG1vcmUgbntbJiomXX1ldyB1cHN0cmVhbSByZWxlYXNlcy4gVGhlIHNlY3VyaXR5IHN1cHBvcnQgb2YgUEhQCjUuNCBpbiBEZWJpYW4gd2lsbCBiZSBiZXN0e1smKiZdfSBlZmZvcnQgb25seSBhbmQgeW91IGFyZSBzdHJvbmdseSBhZHZpc2VkCnRvIHVwZ3JhZGUgdG8gbGF0ZXN0IHN0YWJsZSBEZWJpYW57WyYqJl19IHJlbGVhc2UgdGhhdCBpbmNsdWRlcyBQSFAgNS42IHRoYXQKd2lsbCByZWFjaCBlbmQgb2Ygc2VjdXJpdHkgc3VwcG9ydCBvbiAyOHtbJiomXX0gQXVnIDIwMTcuCgotLSBPbmTDhWVqIFN1csODwr0gJmx0O29uZHJlakBkZWJpYW4ub3JnJmd0OyBTdW4sIDA0IE9jdCAyMDE1IDE3e1smKiZdfTowNTozNyArMDIwMApcIjt7WyYqJl19[[/code]]

Time to upgrade!

After a bit of digging around here is how I did it.  I’m moving from PHP 5.4 to PHP 5.6

[[code]]czoxNzM6XCIKIyBwaHAgLS12ZXJzaW9uClBIUCA1LjQuNDUtMCtkZWI3dTIgKGNsaSkgKGJ1aWx0OiBPY3QgMTcgMjAxNSAwOTowMTp7WyYqJl19NDgpCkNvcHlyaWdodCAoYykgMTk5Ny0yMDE0IFRoZSBQSFAgR3JvdXAKWmVuZCBFbmdpbmUgdjIuNC4wLCBDb3B5cmlnaHQgKGMpIHtbJiomXX0xOTk4LTIwMTQgWmVuZCBUZWNobm9sb2dpZXMKXCI7e1smKiZdfQ==[[/code]]

Ok, so here is the version I’m starting with on Debian 7.9 (Wheezy). During this process, I’m using unsigned packages so get used to this fine message, and packages being held back, unless I manually install them:

[[code]]czo1MzU6XCIKUmVhZGluZyBwYWNrYWdlIGxpc3RzLi4uIERvbmUKVzogR1BHIGVycm9yOiBodHRwOi8vcGFja2FnZXMuZG90ZGViLm97WyYqJl19cmcgd2hlZXp5IFJlbGVhc2U6IFRoZSBmb2xsb3dpbmcgc2lnbmF0dXJlcyBjb3VsZG5cJ3QgYmUgdmVyaWZpZWQgYmVjYXVzZSB0aGV7WyYqJl19IHB1YmxpYyBrZXkgaXMgbm90IGF2YWlsYWJsZTogTk9fUFVCS0VZIEU5Qzc0RkVFQTIwOThBNkUKVzogR1BHIGVycm9yOiBodHRwOntbJiomXX0vL3BhY2thZ2VzLmRvdGRlYi5vcmcgd2hlZXp5LXBocDU2LXp0cyBSZWxlYXNlOiBUaGUgZm9sbG93aW5nIHNpZ25hdHVyZXMgY291e1smKiZdfWxkblwndCBiZSB2ZXJpZmllZCBiZWNhdXNlIHRoZSBwdWJsaWMga2V5IGlzIG5vdCBhdmFpbGFibGU6IE5PX1BVQktFWSBFOUM3NEZFe1smKiZdfUVBMjA5OEE2RQpSZWFkaW5nIHBhY2thZ2UgbGlzdHMuLi4gRG9uZQpCdWlsZGluZyBkZXBlbmRlbmN5IHRyZWUKUmVhZGluZyBzdGF7WyYqJl19dGUgaW5mb3JtYXRpb24uLi4gRG9uZQowIHVwZ3JhZGVkLCAwIG5ld2x5IGluc3RhbGxlZCwgMCB0byByZW1vdmUgYW5kIDAgbm90IHtbJiomXX11cGdyYWRlZC4KXCI7e1smKiZdfQ==[[/code]]

But if you can read this, then it worked!

First add these to the /etc/apt/sources.lst file:

[[code]]czoxOTU6XCJkZWIgaHR0cDovL3BhY2thZ2VzLmRvdGRlYi5vcmcgd2hlZXp5IGFsbApkZWItc3JjIGh0dHA6Ly9wYWNrYWdlcy5kb3R7WyYqJl19ZGViLm9yZyB3aGVlenkgYWxsCmRlYiBodHRwOi8vcGFja2FnZXMuZG90ZGViLm9yZyB3aGVlenktcGhwNTYtenRzIGFsbApkZWItc3tbJiomXX1yYyBodHRwOi8vcGFja2FnZXMuZG90ZGViLm9yZyB3aGVlenktcGhwNTYtenRzIGFsbFwiO3tbJiomXX0=[[/code]]

Then we can run the usual apt-get update / apt-get upgrade shuffle.

On my first run I got this fun output:

[[code]]czoyNjU6XCIKVGhlIGZvbGxvd2luZyBwYWNrYWdlcyBoYXZlIGJlZW4ga2VwdCBiYWNrOgpsaWJhcGFjaGUyLW1vZC1waHA1IGxpYm17WyYqJl19eXNxbGNsaWVudDE4IG15c3FsLXNlcnZlciBwaHAtcGVhciBwaHA1IHBocDUtY2xpCnBocDUtY29tbW9uIHBocDUtZ2QgcGhwNS1teXtbJiomXX1zcWwKVGhlIGZvbGxvd2luZyBwYWNrYWdlcyB3aWxsIGJlIHVwZ3JhZGVkOgpteXNxbC1jb21tb24KMSB1cGdyYWRlZCwgMCBuZXdse1smKiZdfXkgaW5zdGFsbGVkLCAwIHRvIHJlbW92ZSBhbmQgOSBub3QgdXBncmFkZWQKXCI7e1smKiZdfQ==[[/code]]

So I went ahead and updated mysql-common.  And during that upgrade I got the new message:

[[code]]czoxMjQ6XCIKV0FSTklORzogVGhlIGZvbGxvd2luZyBwYWNrYWdlcyBjYW5ub3QgYmUgYXV0aGVudGljYXRlZCEKbXlzcWwtY29tbW97WyYqJl19bgpJbnN0YWxsIHRoZXNlIHBhY2thZ2VzIHdpdGhvdXQgdmVyaWZpY2F0aW9uIFt5L05dPyB5ClwiO3tbJiomXX0=[[/code]]

So yes these packages are all unsigned. 🙁

After this, I ran:

[[code]]czoyNDpcIgojIGFwdC1nZXQgaW5zdGFsbCBwaHA1ClwiO3tbJiomXX0=[[/code]]

And got the following scary looking output

[[code]]czo3NDA6XCIKVGhlIGZvbGxvd2luZyBleHRyYSBwYWNrYWdlcyB3aWxsIGJlIGluc3RhbGxlZDoKbGliYXBhY2hlMi1tb2QtcGhwNSB7WyYqJl19bGlidDEtNSBsaWJ2cHgxIHBocDUtY2xpIHBocDUtY29tbW9uIHBocDUtZ2QgcGhwNS1teXNxbApTdWdnZXN0ZWQgcGFja2FnZXM6CntbJiomXX1waHA1LXVzZXItY2FjaGUKUmVjb21tZW5kZWQgcGFja2FnZXM6CnBocDUtcmVhZGxpbmUKVGhlIGZvbGxvd2luZyBORVcgcGFja2Fne1smKiZdfWVzIHdpbGwgYmUgaW5zdGFsbGVkOgpsaWJ0MS01IGxpYnZweDEKVGhlIGZvbGxvd2luZyBwYWNrYWdlcyB3aWxsIGJlIHVwZ3JhZGV7WyYqJl19ZDoKbGliYXBhY2hlMi1tb2QtcGhwNSBwaHA1IHBocDUtY2xpIHBocDUtY29tbW9uIHBocDUtZ2QgcGhwNS1teXNxbAo2IHVwZ3JhZHtbJiomXX1lZCwgMiBuZXdseSBpbnN0YWxsZWQsIDAgdG8gcmVtb3ZlIGFuZCAzIG5vdCB1cGdyYWRlZC4KTmVlZCB0byBnZXQgNyw2NTkga0Ige1smKiZdfW9mIGFyY2hpdmVzLgpBZnRlciB0aGlzIG9wZXJhdGlvbiwgNSwyMjAga0Igb2YgYWRkaXRpb25hbCBkaXNrIHNwYWNlIHdpbGwgYmV7WyYqJl19IHVzZWQuCkRvIHlvdSB3YW50IHRvIGNvbnRpbnVlIFtZL25dPyB5CldBUk5JTkc6IFRoZSBmb2xsb3dpbmcgcGFja2FnZXMgY2FubntbJiomXX1vdCBiZSBhdXRoZW50aWNhdGVkIQpwaHA1LW15c3FsIHBocDUtY2xpIHBocDUtZ2QgbGliYXBhY2hlMi1tb2QtcGhwNSBwaHA1LWNve1smKiZdfW1tb24gcGhwNQpJbnN0YWxsIHRoZXNlIHBhY2thZ2VzIHdpdGhvdXQgdmVyaWZpY2F0aW9uIFt5L05dPyB5ClwiO3tbJiomXX0=[[/code]]

And then finally, after another apt-get update / apt-get upgrade I finally get this output:

[[code]]czoxMzg6XCIKVGhlIGZvbGxvd2luZyBwYWNrYWdlcyBoYXZlIGJlZW4ga2VwdCBiYWNrOgpsaWJteXNxbGNsaWVudDE4IG15c3FsLXN7WyYqJl19ZXJ2ZXIKMCB1cGdyYWRlZCwgMCBuZXdseSBpbnN0YWxsZWQsIDAgdG8gcmVtb3ZlIGFuZCAyIG5vdCB1cGdyYWRlZC4KXCI7e1smKiZdfQ==[[/code]]

So just update the held back packages and get it over with.

[[code]]czo0NzpcIgphcHQtZ2V0IGluc3RhbGwgbGlibXlzcWxjbGllbnQxOCBteXNxbC1zZXJ2ZXIKXCI7e1smKiZdfQ==[[/code]]

Ugh, it isn’t pretty.  But now we are on the newer train of PHP!

[[code]]czoyNTY6XCIKIyBwaHAgLS12ZXJzaW9uClBIUCA1LjYuMTQtMX5kb3RkZWIrenRzKzcuMSAoY2xpKSAoYnVpbHQ6IE9jdCAyIDIwMTV7WyYqJl19IDAzOjM5OjIwKQpDb3B5cmlnaHQgKGMpIDE5OTctMjAxNSBUaGUgUEhQIEdyb3VwClplbmQgRW5naW5lIHYyLjYuMCwgQ29weXJpZ3tbJiomXX1odCAoYykgMTk5OC0yMDE1IFplbmQgVGVjaG5vbG9naWVzCndpdGggWmVuZCBPUGNhY2hlIHY3LjAuNi1kZXYsIENvcHlyaWdodCAoe1smKiZdfWMpIDE5OTktMjAxNSwgYnkgWmVuZCBUZWNobm9sb2dpZXMKXCI7e1smKiZdfQ==[[/code]]

Hopefully things continue to work.

10 thoughts on “PHP 5.4 is now obsolete on Debian”

    1. I’d love to pay someone to write me a system that works on IIS 4 + ASP/SQL 4.21 and is usable on IE 3.0 and higher. But I don’t see that happening anytime soon.

  1. I don’t think that WordPress supports IE3.0 either. Sarcasm aside there are new CMS systems that don’t use PHP and suck less. Even Python based. Also there is new paradigm of static page generation via CMS. You don’t edit 5 year old blog posts that often and static pages use lot less server resources compared to dynamic.

    1. Yeah, it’s basically what this ‘cache’ pluggin does, is it builds the pages as requested, then just serves static pages. Themes change, and I guess for companies, advertising etc as they will have different embedded tracking and advertising.

      Once I get some push on various projects cross compiling, then I’ll look into replacing wordpress… although when it runs, it is pretty low maintenance.

  2. When I do this, it wants to install apache and mysql. I use nginx and mariadb. How can I upgrade from php5.4 to 5.6 without installing these? Also if I’m using php-fpm, does the upgrade process change?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.