PHP 5.6 Beta on Ubuntu

PHP also known as Pre HTML Processor is a server-sided language used for web development, It is built for writing web pages and web application. It is one of the most popular languages used by web developers. The source code is server-sided which means that the client can’t access the code and can only see and have access to HTML.

PHP is very easy to setup and is offer by many hosting servers. It is also very easy to get a PHP development/production environment running on your system.

PHP 5.6 will offer new features and more functionality. Currently PHP 5.6.x is in it’s beta stage of development and does not have any stable build, please do not run it on your production server.

We will be installing pre-built version of PHP 5.6.x on Ubuntu using PPA. The version of PHP 5.6.x available in the PPA be updated by the PPA maintainer.

Here is the

Installing

Adding the PHP 5.6.x PPA.

sudo apt-add-repository ppa:ondrej/php5-5.6  

Updating the local packages database.

sudo apt-get update  


sudo apt-get install php5  

You can install PHP 5.6.x modules and extensions in the same old way.

sudo apt-get install php5-  

example of installing the PHP 5.6.x MySQL module.

sudo apt-get install php5-mysql  

You can get information over the PHP install by creating a info.php in your web root and pasting in the code below.


If you don’t have nginx, apache or lighttpd installed on your system, you can run PHP built-in development server also from the terminal using ‘PHP-Cli’.

Enter into the directory where you have saved you PHP files and run. This should bring up the PHP built-in development server.

php -S localhost:8000  

Now we have PHP 5.6.x Beta installed on Ubuntu. Happy Coding!

If you have any problem feel free to leave a comment below.

Leave a Reply