<?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 => 'es',
  ),
  'this' => 
  array (
    0 => 'install.windows.iis.php',
    1 => 'Instalaci&oacute;n con IIS para Windows',
    2 => 'Instalaci&oacute;n con IIS para Windows',
  ),
  'up' => 
  array (
    0 => 'install.windows.php',
    1 => 'Instalaci&oacute;n en sistemas Windows',
  ),
  'prev' => 
  array (
    0 => 'install.windows.apache2.php',
    1 => 'Apache 2.x en Microsoft Windows',
  ),
  'next' => 
  array (
    0 => 'install.windows.tools.php',
    1 => 'Herramientas de terceros para la instalaci&oacute;n de PHP',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    '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">Instalación con IIS para Windows</h2>

 <div class="simplesect">
  <h3 class="title">Instalar IIS</h3>
  <p class="simpara">
   Los Servicios de Información de Internet (Internet Information Services - IIS) están integrados en Windows.
   En Windows Server, el rol IIS puede ser añadido a través del Administrador del Servidor.
   El módulo CGI debe ser incluido.
   En los escritorios Windows, IIS debe ser añadido a través del Panel de Control.
   La documentación de Microsoft proporciona <a href="https://docs.microsoft.com/en-us/previous-versions/ms181052(v=vs.80)" class="link external">&raquo;&nbsp;instrucciones detalladas para habilitar IIS</a>.
   Para el desarrollo,
   <a href="https://www.microsoft.com/en-us/download/details.aspx?id=48264" class="link external">&raquo;&nbsp;IIS/Express</a> también puede ser utilizado.
  </p>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
   <span class="simpara">
    La versión No-Thread Safe (NTS) de PHP debe ser instalada cuando se utiliza
    el gestor FastCGI con IIS.
   </span>
  </p></blockquote>
 </div>
 <div class="simplesect">
  <h3 class="title">Configurar PHP con IIS</h3>

  <p class="simpara">
   En el Administrador de IIS, instale el módulo FastCGI y añada una correspondencia de gestor para
   <code class="literal">.php</code> al camino de <var class="filename">php-cgi.exe</var>
   (no <var class="filename">php.exe</var>)
  </p>

  <p class="simpara">
   El comando <strong class="command">APPCMD</strong> puede ser utilizado para
   crear scripts de configuración de IIS.
  </p>
 </div>
 <div class="simplesect">
  <h3 class="title">Ejemplo de script batch</h3>
  <div class="example" id="example-1">
   <p><strong>Ejemplo #1 Línea de comandos para configurar IIS y PHP</strong></p>
   <div class="example-contents">
<div class="cdata"><pre>

@echo off

REM descargar el archivo .ZIP de la versión de PHP desde http://windows.php.net/downloads/

REM ruta del directorio en el que el archivo .ZIP de PHP ha sido descomprimido (sin \ final)
set phppath=c:\php

REM Elimina los gestores PHP actuales
%windir%\system32\inetsrv\appcmd clear config /section:system.webServer/fastCGI
REM La siguiente comanda generará un mensaje de error si PHP no está instalado. Esto puede ser ignorado.
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /-[name=&#039;PHP_via_FastCGI&#039;]

REM Configura el gestor 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 Configura las 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); ?>