PHP FastCGI

Installation

  1. Open Web Platform Installer and install "PHP project":
  2. Open project's home page and select PHP version to use:
  3. Check phpinfo output:
  4. Replace index.php file with your project's file.

Deployment:

PHP (from Microsoft WebPI), Helicon Zoo Module

 

web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration> 
 <system.webServer>
  <heliconZoo> 
   <application name="php.pipe" >
    <environmentVariables>
     <!-- Uncomment line below if you want to use custom php.ini file --> 
     <!-- <add name="PHP_INI" value="%APPL_VIRTUAL_PATH%\php.ini" />  -->
    </environmentVariables>
   </application>
  </heliconZoo>
  <handlers>
   <remove name="PHP53_via_FastCGI" />
   <remove name="PHP_via_FastCGI" />
   <add name="php.pipe#x86" scriptProcessor="php.5.3.pipe"
        path="*.php" verb="*" modules="HeliconZoo_x86"
        preCondition="bitness32" resourceType="Unspecified" requireAccess="Script" />
   <add name="php.pipe#x64" scriptProcessor="php.5.3.pipe"
        path="*.php" verb="*" modules="HeliconZoo_x64"
        preCondition="bitness64" resourceType="Unspecified" requireAccess="Script" />
  </handlers>
 </system.webServer>
</configuration>

Environment variables

No settings are required by default. Helicon Zoo module handles every request to .php file.

PHP_INI — optional path to a custom php.ini file. If the variable isn’t set the %ProgramFiles%\PHP\v5.3\php.ini is loaded. Helicon Zoo will monitor changes to this file and reload it automatically.

Example index.php

<?php
phpinfo();
?>

Why use Helicon Zoo PHP support instead of IIS built-in FastCGI/PHP options:

  • Better isolation in a shared environment - every application runs in a separate process with separate user permissions instead of sharing several processes between all applications on a server. Means better security and stability.
  • Custom php.ini files - separate PHP settings for different applications.
  • Ability to install required PHP modules under web site directory using costom php.ini file to set PHP modules path.
  • File uploads and slow clients will not exhaust server resources. Helicon Zoo buffers HTTP communication with client and sends requests to the backend only when all data is received. Without this function PHP worker process would be blocked until client data is fully loaded which creates a tight bottleneck in the server performance.

  • Application workers are created and recycled dynamically depending on current load. This provide better load balancing especially in a shared environment.