Logo
  • PHP
    • HipHop / HHVM
    • Modern PHP
    • PHPStorm
    • LAMP
    • Laravel
    • Composer
    • PDO
  • JavaScript
    • node.js
    • AngularJS
  • CSS
    • SASS
    • “CSS4” (CSS level 4)
  • HTML
  • Git
  • LAMP
  • Vagrant
  • UI / UX
  • Architecture of …
  • Off-Topic
With ♥ from Berlin
August 22, 2013
Chris
Linux, PHP
Comments Off on How to install / setup PHP 5.5.x on Ubuntu 12.04 LTS

How to install / setup PHP 5.5.x on Ubuntu 12.04 LTS

PreviousNext
mod-rewrite-ubuntu-14-04-lts

Please note: This works fine. But this package will also upgrade your apache to version 2.4 which has different config files than apache 2.2 and even deletes stuff, like /etc/apache2/sites-available/default when upgrading. This may result in a loss of your apache settings (vhost, mod_rewrite stuff etc.). Be aware of that ! This shit cost me a full weekend. This affects only upgrades, not fresh installs for sure. Update: This is a known bug (more here), I’ll keep this post updated…

 

How to install

There’s an excellent and (usually) hassle-free method to install the latest version of PHP5 (which is 5.5.3 when i’m writing this) with 3 simple bash commands:

1. Add this package-repository to your system. If Ubuntu says that you need to download a key first, then follow the instructions given in the notice.

sudo add-apt-repository ppa:ondrej/php5

If you get an error message now, then please do an update first and install the python-software-properties, that need to be necessary to add a package repository:

sudo apt-get update
sudo apt-get install python-software-properties

2. Update

sudo apt-get update

3. Install PHP

sudo apt-get install php5

Check the installed version of PHP via

php5 -v

Please note: The ondrej/php5 repository (which is used here) provides the very latest version of PHP. Usually the new version of PHP is available a few days after it was been officially released. This is really cool and a big step forward as Ubuntu, Debian, CentOS etc. provide only very old versions by default.

 

To UPDATE from PHP 5.3 / 5.4 to PHP 5.5:

It’s also possible to update from any PHP version to the latest one with exactly the commands above. But, after doing

sudo apt-get install php5

you’ll have to restart the server with

sudo /etc/init.d/apache2 restart

or

sudo service apache2 restart

 

By the way, I’ve also written a tutorial on “How to setup latest version of PHP 5.5 on Debian Wheezy 7.0/7.1/7.2 (and how to fix the GPG key error)“, which is different from this here.

 

PHPPHP 5.5Ubuntuubuntu 12.04 LTS
Share this

JavaScript ECMAScript6 – A short video introduction (5min)

Excellent introduction into the new ECMAScript6, the spec behind JavaScript.

What’s new in PHPStorm 10 (Official promo video)

PHPStorm 10 is out! New features are mainly full PHP7 support, much better auto-recognation / autocompletion (even within arrays (unsure

php

PHP 5.6 announced, statically typed (!) “new” PHP announced by Facebook devs

PHP 5.6 goes alpha PHP 5.6 has been announced for a while now, and these days things get serious (code-freeze,

[Link] Interesting: Designing a Nuclear Waste Warning Symbol That Will Still Make Sense in 10,000 Years

Interesting article for everybody with a faible for UI/UX: Slate – Designing a Nuclear Waste Warning Symbol That Will Still

mod-rewrite-ubuntu-14-04-lts

How to enable mod_rewrite in Ubuntu 14.04 LTS

A little note first: This is the most basic way to enable mod_rewrite. However, it’s not the best way. The

Test GZIP compression of your server easily

If you are running servers (which you hopefully do), then Gzip compression should be a topic, as this simple thing

php

How to install PHP 7.0 on Ubuntu 14.04 LTS

You want to install PHP 7 within 60 seconds ? No problem, but first make sure you have a fresh

laracon-2014-eu-amsterdam

Laracon 2013 – Kapil Verma: Engineering Complex Applications with Laravel 4 (40min video)

More videos of 2013’s and 2014’s Laracon events from US and EU on their Youtube channel.

O’Reilly sells EVERY ebook for -50% right now!

A good chance to grab some IT books: O’Reilly sells every single book in their portfolio with a -50% discount

mod-rewrite-ubuntu-14-04-lts

Which server OS version to choose ? Some EOL lists of Debian, Ubuntu and CentOS

Moving running projects (especially smaller ones that you’ve made for clients years ago) from an outdated and not-supported linux version

1/4

Categories

Search

ubuntu-14.04-lts
First view: Ubuntu 14.04 LTS brings PHP 5.5 and Apache 2.4
twig
A 6min video introduction into Twig, the PHP templating engine
css3-chrome-font
Google rolls out Chrome 37, finally fixes horrible font-rendering
steam sale coupon voucher
-30% to -90% on Steam and Origin
composer
The difference between “composer install” and “composer update” – nailed on the head
PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)
How to show memory usage (Ubuntu)
How to hack time (KUNG FURY promo campaign)
Beautiful, minimal WordPress theme ZUKI by Elmastudio (with 30% discount)
Frontend Ops Conf 2014 – Sarah Goff-Dupont: Git, Continuous Integration and Making It Pretty (31min video)
pdo-debug
Debug PDO with this one-line function. Yeah!
october cms
October CMS, built on top of Laravel, is beautiful, clever and on the way to be the new #1 CMS
Install MINI in 30 seconds inside Ubuntu 14.04 LTS
shadow dom
A quick video introduction into Shadow-DOM, the game-changing DOM-subtree-technology
php
“Belt” adds very clever everyday functions to PHP, comes with JavaScript naming styles and eventually solves the needle/haystack problem

Tags

apache bash centos composer conference coupon CSS debian fonts framework git GitHub hack HHVM HipHop HTML HTML5 IDE JavaScript JS LAMP laravel linux mod_rewrite MVC MySQL Nginx optimization PHP PHP 5.5 PHP 5.6 phpmyadmin PHPStorm security server SSD Ubuntu UI UX vagrant video virtual machine voucher VPS wordpress
Side-Project: Wordle-Solver:
www.wordle-helper.info

Pages

  • Privacy Policy