PHP 8.3.4 Released!

Instalación manual de PHP en Windows

Elección del servidor web

IIS

IIS está integrado en Windows. En Windows Server, use Server Manager para añadir el rol de IIS. Asegúrese de incluir CGI Role Feature. En Windows Desktop, use Añadir/Eliminar Programas del Panel de Control para añadir IIS. La documentación de Microsoft tiene » instrucciones detallas. Para aplicaciones web de escritorio y desarrollo web, también se puede usar IIS/Express o PHP Desktop.

Ejemplo #1 Linea de órdenes para configurar IIS y PHP


@echo off

REM Descargar el fichero .ZIP o la compilación de PHP desde http://windows.php.net/downloads/
REM
REM Ruta al directorio donde se ha descomprimido el fichero .ZIP de PHP
set phpdir=c:\php


REM Limpiar los manejadores actuales de PHP
%windir%\system32\inetsrv\appcmd clear config /section:system.webServer/fastCGI
REM El siguiente comando 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='PHP_via_FastCGI']

REM Instalar el manejador de PHP
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+[fullPath='%phppath%\php-cgi.exe']
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='%phppath%\php-cgi.exe',resourceType='Unspecified']
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /accessPolicy:Read,Script

REM Configurar las variables de FastCGI
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='%phppath%\php-cgi.exe'].instanceMaxRequests:10000
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHP_FCGI_MAX_REQUESTS',value='10000']"
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHPRC',value='%phppath%\php.ini']"

Apache

Existen varias compilaciones de Apache2 para Windows. Se recomiendan las compilaciones Apache de ApacheLounge, aunque otras opciones pueden ser XAMPP, WampServer y BitNami, las cuales proporcionan herramientas de instalación automática. Se puede utilizar mod_php o mod_fastcgi para cargar PHP en Apache. Si se emplea mod_php, se DEBE utilizar una compilación TS de Apache construida con la misma versión de Visual C y la misma CPU (x86 o x64).

Elegir una compilación

Descargue las versiones de producción de PHP desde » http://windows.php.net/download/. Todas las compilaciones están optimizadas (PGO), y las versiones de QA y GA se prueban exhaustivamente.

Existen 4 tipos de compilación de PHP:

  • Thread-Safe(TS) - usada para servidores web monoproceso, como Apache con mod_php

  • Non-Thread-Safe(NTS) - usada para IIS y otros servidores web FastCGI (Apache con mod_fastcgi) y la recomendad para scripts de línea de comandos

  • x86 - para sistemas de 32-bits.

  • x64 - para sistemas de 64 bits.

add a note

User Contributed Notes 1 note

up
-54
klaussantana at gmail dot com
3 years ago
If you're installing PHP 8.0.1 as Apache http server module, in httpd.conf you must use "php_module" in "LoadModule" directive instead of versioned names like in previous versions (aka, php5_module, php7_module, ...). Make the directive as follow:

LoadModule php_module "/path/to/php8apache2_4.dll"

I cracked my head over this...
To Top