Upload Share and Earn

Thursday, September 6, 2007

Install and configure PHP5 on windows system

There three major steps involved in installing PHP are:

Downloading PHP Installing PHP Configuring PHP Testing PHP

Before we start you have to understand that there are two possible places where a website can live

A local computer which can be a desktop computer, a laptop++
The internet. A website which is viewed on the "www." internet resides some where with a hosting company.
So to run a website on a personal computer PC you need to install PHP on it. Firstly make sure you have a web server running on your computer. If you are wondering what is a web server and how do you know if it is working or running or what ever on my computer then click here.

Ok now I assume the web server is running. Lets move on with our journey of installing PHP.

Download PHP.

Click here to download PHP 5.2.1 software package from the official site.
Click here to download PHP 5.2.1 installer from the official site. (Automatically installs configure PHP and web server)
Install PHP

Install PHP automatically using an installer

This is a very quick and clean way of installing PHP. It installs and configures PHP and even the web server (IIS, Apache++).

We recommend you take the time to setup PHP yourself as this will provide you with a better understanding of the system, and enables you to install PHP extensions easily when needed.

Install PHP manually

Upgrading from a previous PHP version:

For simplification previous editions of the installation manual suggested moving various ini and DLL files into your SYSTEM (i.e. C:WINDOWS) folder.
We advise you remove all of these files (like php.ini and PHP related DLLs from the Windows SYSTEM folder) before moving on with a new PHP installation.
Be sure to backup these files as you might break the entire system. The old php.ini might be useful in setting up the new PHP as well.
Start Installation

Unzip the PHP 5.2.1 package at C:PHP (ie create a directory call PHP and unload the zip package in it)
Make the C:PHP directory available to the web server, CGI CLI binaries++. (If you don't understand any terms do not worry just move on and do as I say you will have your PHP running in no time)
Right click on "My Computer" which is located on your computer desktop
Go to the "Advanced Tab"
Click on the "Environment Variables" button
Look into the 'System Variables' pane
Find the Path entry (you may need to scroll to find it)
Double click on the Path entry
Enter your PHP directory at the end, including ';' before (e.g. ;C:php)
Press OK and restart your computer
Find the file "php.ini-recommended"in C:PHP. Read it carefully, this file drastically affect the PHP setup. Rename the file to "PHP.ini" and place it in C:windows folder (also known as System folder)
Configure PHP

The next step involves configuring PHP with web server IIS. If you do not know what IIS is and is not installed on your computer Click Here else read on
Click Start -> Control Panel -> Administrative Tools -> Internet Information Systems (IIS)
Double click on "Local Computer" -> Right click "Default Website" - > "Properties" -> "Home Directory"
Change the Execute Permissions to "Scripts only"
Click on the Configuration button, and choose the Application Mappings tab.
Click Add and set the Executable path to the appropriate ISAPI DLL. Example PHP 5 value is: C:phpphp5isapi.dll Supply .php as the extension. Leave "Method exclusions" blank, and check the "Script engine" checkbox. Now, click OK a few times.
Stop IIS completely
Start IIS again
Test PHP

Open notepad or dreamweaver++
Type
Place this file at C:Inetpubwwwroot
Click Start -> Control Panel -> Administrative Tools -> Internet Information Systems (IIS)
Double click on "Local Computer" -> Right click "Default Website" -> "Properties" -> "Documents" -> "Add" -> index.php -> Click "OK"
Open internet explorer or mozilla firefox++ and type http://localhost
If a page opens with PHP details and lot other details then PHP is installed properly configured and ready to rock and roll !!! :) Phew....

Now as you have installed PHP5.2..... (the story doesn't end here, it has just begun ;))

No comments:

 
eXTReMe Tracker