<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/install.windows.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'install.windows.iis.php',
    1 => 'Installation avec IIS pour Windows',
    2 => 'Installation avec IIS pour Windows',
  ),
  'up' => 
  array (
    0 => 'install.windows.php',
    1 => 'Installation sur les syst&egrave;mes Windows',
  ),
  'prev' => 
  array (
    0 => 'install.windows.apache2.php',
    1 => 'Installation pour Apache 2.x sur les syst&egrave;mes Windows',
  ),
  'next' => 
  array (
    0 => 'install.windows.tools.php',
    1 => 'Outils tiers pour l\'installation de PHP',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'install/windows/iis.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="install.windows.iis" class="sect1">
 <h2 class="title">Installation avec IIS pour Windows</h2>

 <div class="simplesect">
  <h3 class="title">Installer IIS</h3>
  <p class="simpara">
   Les Services d&#039;informations Internet (Internet Information Services - IIS) sont intégrés à Windows.
   Sur Windows Server, le rôle IIS peut être ajouté via le Gestionnaire de serveur.
   La fonctionnalité de rôle CGI doit être incluse.
   Sur les bureaux Windows, IIS doit être ajouté via l&#039;option Ajout/Suppression de programmes du Panneau de configuration.
   La documentation Microsoft fournit <a href="https://docs.microsoft.com/en-us/previous-versions/ms181052(v=vs.80)" class="link external">&raquo;&nbsp;des instructions détaillées pour activer IIS</a>.
   Pour le développement,
   <a href="https://www.microsoft.com/en-us/download/details.aspx?id=48264" class="link external">&raquo;&nbsp;IIS/Express</a> peut également être utilisé.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    La version Non-Thread Safe (NTS) de PHP doit être installée lors de l&#039;utilisation
    du gestionnaire FastCGI avec IIS.
   </span>
  </p></blockquote>
 </div>
 <div class="simplesect">
  <h3 class="title">Configurer PHP avec IIS</h3>

  <p class="simpara">
   Dans le gestionnaire IIS, installer le module FastCGI et ajouter un mappage de gestionnaire pour
   <code class="literal">.php</code> au chemin de <var class="filename">php-cgi.exe</var>
   (pas <var class="filename">php.exe</var>)
  </p>

  <p class="simpara">
   La commande <strong class="command">APPCMD</strong> peut être utilisée pour scripter
   la configuration IIS.
  </p>
 </div>
 <div class="simplesect">
  <h3 class="title">Exemple de script batch</h3>
  <div class="example" id="example-1">
   <p><strong>Exemple #1 Ligne de commande pour configurer IIS et PHP</strong></p>
   <div class="example-contents">
<div class="cdata"><pre>

@echo off

REM télécharger le fichier .ZIP de la version de PHP depuis http://windows.php.net/downloads/

REM chemin du répertoire dans lequel le fichier .ZIP de PHP a été décompressé (sans \ final)
set phppath=c:\php


REM Efface les gestionnaires PHP actuels
%windir%\system32\inetsrv\appcmd clear config /section:system.webServer/fastCGI
REM La commande suivante générera un message d&#039;erreur si PHP n&#039;est pas installé. Cela peut être ignoré.
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /-[name=&#039;PHP_via_FastCGI&#039;]

REM Configure le gestionnaire PHP
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+[fullPath=&#039;%phppath%\php-cgi.exe&#039;]
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /+[name=&#039;PHP_via_FastCGI&#039;,path=&#039;*.php&#039;,verb=&#039;*&#039;,modules=&#039;FastCgiModule&#039;,scriptProcessor=&#039;%phppath%\php-cgi.exe&#039;,resourceType=&#039;Unspecified&#039;]
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /accessPolicy:Read,Script

REM Configure les variables FastCGI
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath=&#039;%phppath%\php-cgi.exe&#039;].instanceMaxRequests:10000
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+&quot;[fullPath=&#039;%phppath%\php-cgi.exe&#039;].environmentVariables.[name=&#039;PHP_FCGI_MAX_REQUESTS&#039;,value=&#039;10000&#039;]&quot;
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+&quot;[fullPath=&#039;%phppath%\php-cgi.exe&#039;].environmentVariables.[name=&#039;PHPRC&#039;,value=&#039;%phppath%\php.ini&#039;]&quot;
</pre></div>
   </div>

  </div>
 </div>
</div><?php manual_footer($setup); ?>