Install PHP On Windows

Here are the steps to install PHP in Windows operating system.

  1. Introduction to PHP
  2. Web Platform Installer
  3. Manual Installation
  4. Conclusion

Step 1: Introduction to PHP

PHP – Hypertext Preprocessor

Created by - Rasmus Lerdorf in 1994

Developer – Zend Technologies

OS – Unix like, Windows

PHP is a server side scripting language and it is designed for web development and it may be embedded with HTML (Hyper Text Markup Languages).

Step 2: Web Platform Installer

Firstly, download windows installer from here.

The following window will open and then find the download link.

Download Microsoft Web Platform Installer
                              Figure 1: Download Microsoft Web Platform Installer

Click free download and then the downloading process will starts.

downloading  

Hit save File. After the file is downloaded click to open and run the file.

Installer window open in the following figure.

Installer window
                                                      Figure 3: Installer window

After the installer window open click -> Products

Under products panel click -> frame work.

 Frameworks Panel
                                                Figure 4: Frameworks Panel

Under frameworks panel click Add which version of PHP you want to download. After clicking Add button then hit Install to start installing your PHP.

The following window will open,

Installation
                                                     Figure 5: Installation

Click I Accept.

Installation Starts
                                                    Figure 6: Installation Starts

After the files are downloaded the following window will open to indicate Installation Successful message then hit Finish Button.

Installed Version
                                                Figure 7: Installation Successful

After Installation you check the installed version under Products - > Frameworks Panel,

System Properties
                                                        Figure 8: Installed Version

Step 3: Manual Installation

In manual Installation you have to download PHP version file Click Here.

Download the file in .Zip format and extract this file into C:\ProgramFiles folder.

After the folder is extracted open the folder and rename the php.ini-production file into php.ini

Open the php.ini file and then uncomment the following lines.

extension_dir = "C:\Program\phpext"

set the directory file.

cgi.force_redirect = 0

extension=php_curl.dll

extension=php_mbstring.dll

extension=php_mysql.dll

extension=php_mysqli.dll

extension=php_pdo_mysql.dll

extension=php_xmlrpc.dll

just remove semicolon(;) before the above lines.

Then you have to set the path manually in the following format.

Right Click -> My Compute -> Properties - > Advanced System Settings

Then the following window will open,

Environment Variable window
                              Figure 9: System Properties

In the above window choose Environment Variables.

The following window will open.

Edit Path
              Figure 10: Environment Variable window

Double Click Path under System Variables label,

Handler Mappings
                         Figure 11: Edit Path

In this window set the path for your PHP Directory.

C:\Program Files\ PHP;

Then open your IIS (Internet Information Services) do the following steps.

Click Handler Mappings,

Module Mapping
                                                  Figure 12: Handler Mappings

 

Double click Handler mappings the handler mapping window will open. In that window click Add Module Mapping under Action Pane. The following window will open.

Mapping Window
                                Figure 13: Module Mapping

Enter the above information to that boxes and then Click Request Restrictions -> choose the following,

Mapping Window
                           Figure 14: Mapping Window

Step 4: Conclusion:

After the manual installation your IIS can able to host PHP based websites.

Read more articles on PHP:


Similar Articles