February 22, 2012 in Php


What is PHP?

PHP is one of the most popular HTML-embedded scripting language. You can use PHP to create dynamically generated pages quickly. PHP is a powerful scripting language that is used in most dynamically sites in our days.

How to install PHP on Ubuntu 11.04

To install php and php support for Apache just write the following in console

If you dont have apache already installed please follow this link

$>sudo apt-get install php5 libapache2-mod-php5

When this done you are ready.

If you want to test that php installed successfully in to your system you can write and run a simple php script that will return to you the PHP information. So open the terminal and type:

$>sudo gedit /var/www/html/phpinfo.php

An empty document will open in gedit now just type the following and save the document.


print_r (phpinfo());


Now just open your web browser and point it to http://localhost/phpinfo.php

If all went well a page with PHP info will come up.