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

Serious hard-to-fix bug in OAuth and OpenID discovered, lots of major sites affected

Just a short notice rather than a real article, full story later (I need to check the facts): Several sources

php

[Link] Excellent PHP best practices, 2014 style

Excellent post on This interests me: A collection of useful best practices in modern PHP development, like Redirecting the user

steam sale coupon voucher

-30% to -90% on Steam and Origin

Soft off-topic, but as most developers like to play from time to time, this might be your change to grab

composer

[Link] How to require versions of PHP, HHVM / HipHop, GD, curl, openssl etc. with Composer

Jeremy Kendall has just published a short and excellent overview on how to require versions of PHP (and explicit 64-bit

hiphop php

[Link] How to set up HipHop, Nginx and Laravel in Ubuntu 12.04 LTS (in a Vagrant box)

This is probably the most useful tutorial in 2014 so far. An excellent post by Chris Fidao, explaining how to

php

12 tools for better PHP quality

Nice selection of 12 tools every PHP developer should bookmark. I totally love how the PHP community becomes some kind

PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)

To be honest I’ve not seen the clip yet, but it sounds so awesome and everybody is upvoting it. Have

forbes 30 under 30

Need motivation ? Check out these 2 awesome “FORBES 30 under 30” lists (web, UI, games)

The FORBES magazine has just published the new “30 under 30” lists, and they are really really interesting! Lots of

Experimenting with HHVM at Etsy (Link)

Extremely interesting blog post of Etsy on how they try out HHVM / HipHop: https://codeascraft.com/2015/04/06/experimenting-with-hhvm-at-etsy/

java vs php

Switching from Java to PHP. Seriously. A very interesting and pre-judice-free talk with Ph.D. Aris Zakinthinos

Ph.D. Aris Zakinthinos, CTO of achievers.com, a well-scalability-experienced guy and former IT employee of the military, has just delivered one

1/4

Categories

Search

set up a local virtual machine for development with vagrant and puphpet / puppet (and ubuntu, linux, php, apache, mysql)
A list of downloadable Vagrant boxes (CentOS 5.9 / 6.4, Ubuntu 12 / 13, Debian 6 / 7 / 7.1 / 7.2)
composer
The difference between “composer install” and “composer update” – nailed on the head
atomic-design
An introduction into Atomic Design, a super-clean way to style web applications
zend framework 3
First view on Zend Framework 3 by Matthew O’Phinney
phpstorm 7.0 php
How to install GitHub’s, NetBeans’s and Sublime2’s syntax highlighting code colours theme in PHPStorm 6/7
Microsoft enters post-password era with Hello (promo video)
[Link] Redesigning SoundCloud by Evan Simoni
php
How to install latest PHP 5.4.x on Ubuntu 12.04 LTS (Precise Pangolin)
php mvc
Preview-release of (my) “php-mvc” project (a simple php mvc barebone)
php
How to install sqlite driver for PHP in Ubuntu & Debian
github-logo-octocat
GitHub rolls out .PSD diff and viewing
How to setup a config-free WordPress, PHP and MySQL (for local development) in Windows 7 / 8 in under 3 minutes
First look on Gitter, the chat for GitHub
php-phalcon-logo
Which PHP-framework to learn in 2014 ? PHALCON, by far the fastest ever!
ubuntu-14.04-lts
First view: Ubuntu 14.04 LTS brings PHP 5.5 and Apache 2.4

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