Manual PHP Installation on Windows
Choose Web Server
-
IIS is builtin to Windows. On Windows Server, use Server Manager to add the IIS role. Be sure to include the CGI Role Feature. On Windows Desktop, use Control Panel's Add/Remove Programs to add IIS. See: » https://msdn.microsoft.com/en-us/library/ms181052%28v=vs.80%29.aspx?f=255&MSPPError=-2147217396 For desktop web apps and web-development, you can also use IIS/Express or PHP Desktop
Example #1 Command line to configure IIS and PHP
@echo off REM download .ZIP file of PHP build from http://windows.php.net/downloads/ REM REM path to directory you decompressed PHP .ZIP file into set phpdir=c:\php set phppath=php-5.6.19-nts-Win32-VC11-x86 REM Clear current PHP handlers %windir%\system32\inetsrv\appcmd clear config /section:system.webServer/fastCGI %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='%phpdir%\%phppath%\php-cgi.exe'] %windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='%phpdir%\%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='%phpdir%\%phppath%\php-cgi.exe'].instanceMaxRequests:10000 %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phpdir%\%phppath%\php-cgi.exe'].environmentVariables.[name='PHP_FCGI_MAX_REQUESTS',value='10000']" %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phpdir%\%phppath%\php-cgi.exe'].environmentVariables.[name='PHPRC',value='%phpdir%\%phppath%\php.ini']"
-
There are several builds of Apache2 for Windows. We support ApacheLounge, but other options include XAMPP, WampServer and BitNami, which provide automatic installer tools. You may use mod_php or mod_fastcgi to load PHP on Apache. If you use mod_php, you MUST use a TS build of Apache built with same version of Visual C and same CPU (x86 or x64). How to manually configure Apache2
Choose Build
Download PHP production releases from » http://windows.php.net/download/. A lot of testing and optimization is already done on the snapshot and qa releases, but you are welcome to help us do more. There are 4 types of PHP builds:
-
Thread-Safe(TS) - use for single process web servers, like Apache with mod_php
-
Non-Thread-Safe(NTS) - use for IIS and other FastCGI web servers (Apache with mod_fastcgi) and recommended for command-line scripts
-
x86 - production use of PHP 5.5 or 5.6 or 7.0.
-
x64 - production use of PHP 7.0+ unless its a 32-bit only version of Windows. 5.5 and 5.6 x64 are experimental.
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-install.windows.manual.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.