Installing PHP5.3 on Ubuntu Jaunty

Posted: October 4th, 2009 | Author: Rob Searles | Filed under: PHP, Tutorials | Comments

I have recently dusted off an old laptop to play around with and do some “fun” development. One of the things I have done to this laptop is to install a LAMP stack using PHP 5.3 so I can play around and see what’s new and exciting.

I had a quick Google on how to install PHP 5.3 on Ubuntu and found Brandon Savage’s post on the very subject! Whilst he has a great write up it was one or two of his comments mentioning the DotDeb.Org package repository.

This was a breeze to use and in about 5 minutes I have PHP 5.3 running with Apache and MySQL on my clean Jaunty system.

The first thing to do is add the DotDeb.org repositories to your sources list:

$ sudo nano /etc/apt/sources.list
# php5.3
deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all

Now update and upgrade Ubuntu

$ sudo apt-get update
$ sudo apt-get upgrade

Now simply install apache mysql and php as usual

$ sudo aptitude install apache2 apache2-mpm-prefork mysql-client-5.1 mysql-server-5.1 php5 php5-cli php5-mysql libapache2-mod-php5

You will get a warning about untrusted packages being installed but this simply means that the PHP5.3 stuff is not signed, so I typed in “yes” and carried on. Obviously you can cater this line to your specific needs, but this is the basic stack up and running

When it was all complete I tested out my system:

$ php -v
PHP 5.3.0-0.dotdeb.8 with Suhosin-Patch 0.9.7 (cli) (built: Aug 12 2009 18:11:27)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

and tested out my apache installation using a phpinfo() script:

$ sudo nano /var/www/info.php

then fired up http://localhost/info.php
<?PHP
phpinfo();
?>

and saw as the main header of the page:
PHP Version 5.3.0-0.dotdeb.8

All done. Simple!

If you liked this post, please share it:
  • Digg
  • Reddit
  • Sphinn
  • Facebook
  • del.icio.us
  • YahooMyWeb
  • Furl
  • Mixx
  • Google
  • Fark
  • Live
  • MisterWong
  • StumbleUpon
  • Technorati
  • TwitThis
  • BlogMemes
  • Blogsvine
  • Ma.gnolia
  • Pownce
  • Spurl

Popular Posts


  • Thanks. Thats what I was looking for :) Don't wanna compile all the extensions and their dependent libraries in manually. Not worth the time.

    Happy Holidays Sir.
  • No problem Oliver, glad you found my post useful. Happy PHPing
  • jeffreymcmanus
    Very helpful, Rob, thanks for posting this.
blog comments powered by Disqus