Wednesday, May 25, 2016

Running PHP Application on IIS 7 / Windows 7 Operating System.

Running PHP Application on IIS 7 / Windows 7 Operating System.

To enable FastCGI support on Windows Vista SP1 and Windows 7:
  1. In the Windows Start Menu choose "Run:", type "optionalfeatures.exe" and click "Ok";
  2. In the "Windows Features" dialog expand "Internet Information Services", "World Wide Web Services", "Application Development Features" and then enable the "CGI" checkbox;
  3. Click OK and wait until the installation is complete.





Configure the CGI- and FastCGI-specific settings in php.ini file as shown below:


fastcgi.impersonate = 1
fastcgi.logging = 0
cgi.fix_pathinfo=1
cgi.force_redirect = 0
 
Follow these steps to create an IIS handler mapping for PHP in IIS Manager user interface:
  1. In the Windows Start Menu choose "Run:", type "inetmgr" and click "Ok";
  2. In the IIS Manager user interface select the server node in the "Connections" tree view;
  3. In the "Features View" page open the "Handler Mappings" feature;
 






  1. In the "Actions" pane click "Add Module Mapping...";
  2. In the "Add Module Mapping" dialog enter the following:
    • Request path: *.php
    • Module: FastCgiModule
    • Executable: C:\[Path to PHP installation]\php-cgi.exe
    • Name: PHP_via_FastCGI
  3. Click "Request Restrictions" button and then configure the mapping to invoke handler only if request is mapped to a file or a folder;
  4. Click OK on all the dialogs to save the configuration.




 Reference URL:-

https://secure.php.net/manual/en/install.windows.iis7.php
https://www.youtube.com/watch?v=YAHZKR7ULjI