Getting Started with PHP – Installation, test program and history

Posted on the October 26th, 2011 at 5:43 pm by Larkins Dsouza

PHP is a general-purpose server-side scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document.

PHP can be deployed on most web servers and as a standalone interpreter, on almost every operating system and platform free of charge. A competitor to Microsoft’s Active Server Pages (ASP) server-side script engine and similar languages, PHP is installed on more than 20 million websites and 1 million web servers, including Facebook.

I hope to accomplish straight forward no bullshit tutorials here if you have any questions or doubts please COMMENT HERE.

There are many AMP (Apache, MySQL, PHP) installer out there such as Foxserv, PHPTraid, XAMPP etc. AMP are solution stacks for computer platforms, these software bundles are used to run dynamic Web sites or servers on your PC without the need of a actual server. We are going to use the easiest one XAMPP:

Step 1: For windows user download the XAMPP from here http://www.apachefriends.org/en/xampp-windows.html and for Linux users please refer here http://www.larkins.org/linux/install-apache-mysql-php-and-phpmyadmin-on-ubuntu.html

Step 2: Run the downloaded installation file

Remember this path, this is where you are going to work.

Step 3: After the installation is complete, you will find XAMPP under Start | Programs | XAMPP. You can use the XAMPP Control Panel to start/stop all server and also install/uninstall services.

Press Start where it’s mentioned Apache and MySql and do not touch the rest

Remember by clicking  “Close” the software doesn’t close if you want to stop XAMPP and close click stop for both and click exit. Clicking “Close” just minimizes it to the tray.

Step 4:  After running XAMPP, Open a browser like Internet Explorer, FireFox, Chrome etc type the address http://localhost/ or http://127.0.0.1/ in your browser and check if the following screen comes.

If something like this comes your installation is complete.

Your first PHP program and the steps to run it:

Open a Notepad (or any of your favorite editor maybe Notepad++ or Dreamweaver etc) and type in the following:

<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>

<?php
echo “If this works, Larkins is <i>really</i> Great!”;
?>

</BODY>
</HTML>

And save it to C:\xampp\htdocs or wherever you installed but with this file structure i.e in xampp>>htdocs save it as test.php

Now got to browser and type http://localhost/test.php that’s it. It should work fine.

History and Resources:

Here are some links you need to know about php:

http://en.wikipedia.org/wiki/Php
http://www.php.net/
HISTORY of PHP

If you have any questions please comment here. I will answer as soon as possible than in any other medium.. And may the FORCE be with you.

Leave a Reply




XHTML::
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>