Here are the steps to install PHP in Windows operating system.
- Introduction to PHP
- Web Platform Installer
- Manual Installation
- 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.
Figure 1: Download Microsoft Web Platform InstallerClick free download and then the downloading process will starts.
Hit save File. After the file is downloaded click to open and run the file.
Installer window open in the following figure.
Figure 3: Installer windowAfter the installer window open click -> Products
Under products panel click -> frame work.
Figure 4: Frameworks PanelUnder 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,
Figure 5: InstallationClick I Accept.
Figure 6: Installation StartsAfter the files are downloaded the following window will open to indicate Installation Successful message then hit Finish Button.
Figure 7: Installation SuccessfulAfter Installation you check the installed version under Products - > Frameworks Panel,
Figure 8: Installed VersionStep 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,
Figure 9: System PropertiesIn the above window choose Environment Variables.
The following window will open.
Figure 10: Environment Variable windowDouble Click Path under System Variables label,
Figure 11: Edit PathIn 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,
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.
Figure 13: Module MappingEnter the above information to that boxes and then Click Request Restrictions -> choose the following,
Figure 14: Mapping WindowStep 4: Conclusion:
After the manual installation your IIS can able to host PHP based websites.
Read more articles on PHP: