>>
Open top menu
Tuesday 19 November 2013

Hey geeks ! am here again with a new Trick .. 

==>  How to run PHP on Ubuntu 12.0.3 || How to Run a PHP File in Ubuntu.
************************************************************************
     Today  Most of the Programmer are Using Linux, Ubuntu and Mac etc, because these Operating System's are more Powerful and Secure then any of the Windows Operating System.
  But there are some restriction in these O.S like in Ubuntu who cant just install wamp-server, because it doesn't support to wamp.  Now most the Web Programmer love to Programming in PHP(Hypertext PreProcesser) because it's easy to learn, implementations, huge function support.

so here am giving some usefull steps that can helps you to download the PHP:-
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/
Or You Can also Check this folder in Your System:---->> 
Computers>File System>var>www

Now you have to install PHP.
To install PHP and PHP support for Apache, just write the following in console:
$>sudo apt-get install php5 libapache2-mod-php5
When this is done you are ready.
Let’s go and delete the default page of Apache so we can create our own.
Open a terminal and type:
$>sudo rm /var/www/index.html
If you want to test that PHP is installed successfully into 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/index.php
An empty document will open in gedit now just type the following and save the document.
<?php
print_r (phpinfo());
?>
Restart the web-server by typing:
$>sudo /etc/init.d/apache2 restart
And point your web browser at: http://localhost/
You should now be able to see your first PHP page running.
You can edit this page at any time by typing:
$>sudo gedit /var/www/index.php
Have fun creating your web pages!
If you also need MySQL you can find info on how to install MySQL.

Tagged
Different Themes
Written by Templateify

Aenean quis feugiat elit. Quisque ultricies sollicitudin ante ut venenatis. Nulla dapibus placerat faucibus. Aenean quis leo non neque ultrices scelerisque. Nullam nec vulputate velit. Etiam fermentum turpis at magna tristique interdum.

0 comments