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
sass

New features in SASS 3.3 (a talk by SASS-creator Chris Eppstein)

A very interesting conference talk by Chris Eppstein, creator of SASS itself, showing some of the new features in SASS

git-php-deployment

Extremely simple deployment with PHPloy

Let me ask you a question: How mad do you get when you have to remember which files you edited

The architecture of StackOverflow

One of the most interesting talks these weeks, and a rare insight into one of the most active pages on

php uk conference

PHP Opcache Explained by Julien Pauli (video from PHP UK Conference 2014)

The title says it all. A VERY deep explanation on how OpCache works. If you never heard of this excellent

css3-chrome-font

[Link] Retinafy your Site / Device by Nijiko Yonskai

A simple one-page Gist with all the information you need to make your sites retina-ready: Nijiko Yonskai – Retinafy your

phpstorm-8

PHPStorm 8 has just been released

The excellent PHP IDE PHPStorm just had a major release these days: Version 8 is out, coming with latest PHP

php

Slides from International PHP Conference 2014

Have fun :)   [slideshare id=35391362&doc=codereviewsfranksonsipc2014se-140602104917-phpapp02]     [slideshare id=35383348&doc=ipc14se-planningfortheunplannable-140602073028-phpapp02]   [pdf]http://ilia.ws/files/ipc2014_bottlenecks.pdf[/pdf]   The talk Code Coverage: Covered in Depth

Microsoft announces “holographic” 3D interfaces (promo video)

Microsoft has just announces the damn future in business und consumer electronics! Interactive, “holographic” 3D environments, usable without a keyboard,

composer

The difference between “composer install” and “composer update” – nailed on the head

What a beautiful, direct and clean explaination of the often-confusing difference between composer install and composer update: Beau Simensen (Twitter,

sass laravel

Extremely easy SASS in Laravel (with pure PHP)

Working with SASS is awesome: it reduces your workload dramatically, makes web projects much cleaner, DRYs your code, adds awesome

1/4

Categories

Search

phpstorm 7.0 php
A perfect video tutorial to get started with xdebug in PHPStorm
Stressed and unrelaxed while coding ? Try some ultra-deeply-relaxing ASMR audio clips. It will change your life. Seriously.
mod-rewrite-ubuntu-14-04-lts
How to enable mod_rewrite in Ubuntu 14.04 LTS
php
Slides from International PHP Conference 2014
[Link] Making a website vertically responsive
nginx php 5.5
[Link] Set up Nginx with PHP 5.5 easily
php uk conference
Profiling PHP Applications by Bastian Hofmann (video from PHP UK Conference 2014)
shadow dom
Crossbrowser-safe HTML5 video (IE6+) with a few lines of code and just one .mp4 video file
composer
[Link] How to require versions of PHP, HHVM / HipHop, GD, curl, openssl etc. with Composer
github-logo-octocat
GitHub rolls out .PSD diff and viewing
hack-php
Wow! Facebook devs have rewritten and fixed PHP, releasing it as new language called “Hack” today
php
How to use the PHP 5.5 password hashing functions
css3-chrome-font
[Link] Retinafy your Site / Device by Nijiko Yonskai
composer
A short & simple Composer tutorial
digitalocean coupon
DigitalOcean VPS coupon codes for december 2013 and early 2014

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