Setting up php with Apache2 in Ubuntu 12.04 LTS in command mode

December 22, 2012
By

In the article titled “Setting up a name based Virtual Host in Apache Web Server“, we have installed Apache2 web server in Ubuntu 12.04.

In this article, we will install php5 in Ubuntu 12.04 LTS, so that Apache2 web server can serve php pages.


1. Install php5 in Ubuntu 12.04

sudo apt-get install php5

2. Testing the installation

In the article titled “Setting up a name based Virtual Host in Apache Web Server“, we have setup the host “wptrafficanalyzer.local” in the Apache2 web server. The document root for the host is “/var/www/wpta”.

Let us create a file called index.php in the directory with the given below code :

<?php
    echo phpinfo();
?>

Enter the URL “wptrafficanalyzer.local/index.php in a web browser. If the installation is successful, then it will display a page similar to the Figure 1.

Successfully showing a php page in a web browser

Figure 1 : Successfully showing a php page in a web browser


How to hire me?

I am George Mathew, working as software architect and Android app developer at wptrafficanalyzer.in

You can hire me on hourly basis or on project basis for Android applications development.

For hiring me, please mail your requirements to info@wptrafficanalyzer.in.

My other blogs
store4js.blogspot.com


Android Knowledge Quiz

Ready to test your knowledge in Android? Take this quiz :



Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

Be friend at g+

Subscribe for Lastest Updates

FBFPowered by ®Google Feedburner