How to run PHP on Ubuntu

March 21, 2012 in Php

How to run PHP on Ubuntu.

First of all you will need a web-server to host your PHP pages.

In this tutorial I use Apache2. You can install Apache2 from the Terminal by using:

$>sudo apt-get update

$> sudo apt-get install apache2

when the installation is finished, Apache is up and running and you can test that by pointing your web browser at http://localhost/

The default page will come up with a message "it works".This html file is located under your local file system in folder /var/www/

Now you have to install PHP.

To install PHP and PHP support for Apache, just write the following in console:

Read the rest of this entry →



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

Read the rest of this entry →