Saturday, August 22, 2009

Howto Install PHP6 in ubuntu / Debian Linux

The full stable version of PHP6 is not yet released. But pre-built package is available. Early birds can start now. You can install a development snapshot of PHP 6 and preview it for its features and you can check your old scripts ( PHP 6 have some backwards-compatibility issues), so check your existing codes.

Howto Install PHP6 in Ubuntu / debian linux.

First you have to install GCC and GNU make utility

$sudo apt-get install build-essential
Now PHP6 installation needs some additional libraries

  • Apache development headers, such as apache-prefork-dev
  • International Component for Unicode (ICU) library, libicu-dev
  • The XML2 development headers, libxml2-de etc
You can install the above using
$ sudo apt-get install apache-prefork-dev libicu-dev libxml2-dev

Now you can download latest PHP6 package from here http://snaps.php.net/

$ tar -xzvf php6.0-xxxxxx.tar.gz

Now Change directory to the new directory made by tar and start configuration
$ cd php6.0-xxxxxx
$ sudo ./configure --exec-prefix=/usr
--with-apxs2=/usr/bin/apxs2
--with-config-file-path=/etc/php6
$ sudo make
$ sudo make test
$ sudo make install


2 comments:

jordanwb said...

Sweet thanks. I'll try this on a Virtual Machine.

Anonymous said...

I'm getting a lot of FAILs on Ubuntu 9.10. This is not working yet for Ubuntu 9.10.