Installation manuelle de PHP sous Windows

Choix du serveur Web

IIS

IIS est fourni avec Windows. Sur un serveur Windows, utilisez Server Manager pour ajouter le rôle IIS. Assurez-vous d'inclure la fonctionnalité CGI Role. Sur les bureaux Windows, utilisez le centre de contrôle d'ajout/suppression de programmes pour ajouter IIS. La documentaion de Microsoft a » des instructions détaillées. Pour les applications web bureau et web développement, vous pouvez aussi utiliser IIS/Express ou PHP Bureau

Exemple #1 Ligne de commande pour configurer IIS et PHP

 @echo off REM download .ZIP file of PHP build from http://windows.php.net/downloads/ REM path to directory you decompressed PHP .ZIP file into (no trailing \) set phppath=c:\php REM Clear current PHP handlers %windir%\system32\inetsrv\appcmd clear config /section:system.webServer/fastCGI REM The following command will generate an error message if PHP is not installed. This can be ignored. %windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /-[name='PHP_via_FastCGI'] REM Set up the PHP handler %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 Configure FastCGI Variables %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

Il y a plusieurs versions d'Apache2 pour Windows. Nous supportons ApacheLounge, mais d'autres options incluent XAMPP, WampServer et BitNami, qui fournissent des outils d'installation automatique. Vous devriez utiliser mod_php ou mod_fastcgi pour charger PHP dans Apache. Si vous utilisez mod_php, vous DEVEZ utiliser une version TS de Apache, compilé avec la même version de Visual C et le même CPU (x86 ou x64).

Choix de la version

Téléchargez la version de production de PHP pour Windows depuis » http://windows.php.net/download/. Toutes les versions sont optimisées (PGO), et les versions QA et GA sont minutieusement testées.

Il y a 4 types de versions de PHP :

  • Thread-Safe(TS) - utilisé pour des serveurs web n'ayant qu'un seul processus, comme Apache avec mod_php

  • Non-Thread-Safe(NTS) - utilisé pour IIS et les autres serveurs web FastCGI (Apache avec mod_fastcgi) et c'est la version recommandée pour les scripts en ligne de commande

  • x86 - pour système 32-bits.

  • x64 - pour système 64-bits.

To Top