Thursday, 12 March 2015

How To Configure IIS To Serve PHP | PHP On IIS 8 [ Tutorial ]

In this tutorial i will show you how to install PHP and configure IIS to server PHP webpages
PHP is a widely used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML
this guide is for IIS 8,  tested on windows 8 pro X64 bit 

Installation Steps 
before installation make sure you have enabled CGI module during a installation 
see installation part 


1 :  download php for windows
 
2 : extract downloaded zip ( C:php )
3: download php manager for IIS ( its an extension  for managing PHP from IIS control panel )
Features of PHP manger
  • Register PHP with IIS
  • Validate and properly configure existing PHP installations
  • Run multiple PHP versions side by side on the same server and even within the same web site
  • Check PHP runtime configuration and environment (output of phpinfo() function)
  • Configure various PHP settings
  • Enable or disable PHP extensions
  • Remotely manage PHP configuration in php.ini file.
Easily install, configure, manage and troubleshoot one or many PHP versions on the same IIS server.
4: open php manager and click on register new php installation
php installation iis
Register New PHP installation
5 : choose php-cgi.exe and click okphp installation iis
6: now check phpinfo and choose error reporting
php installation iis
set error reporting
 

7: testing time
open your favorite code editor and type
<?php echo "Hello World !" ; ?>
and save this as hello.php ( or anything ) on c:inetpubwwwroot
and open http://localhost/hello.php
now IIS is serving PHP now in next tutorial i will show you how to set up MySQL in windows