Created
April 1, 2017 20:49
-
-
Save gcormier/360eb2660d79fdcd387b41879137cc4d to your computer and use it in GitHub Desktop.
Setup PHP on Windows Server 2016 / IIS 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM PHP Folder, no trailing backslash at the end! | |
SET PHP_FOLDER=C:\tools\php71 | |
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCgi /+[fullPath='%PHP_FOLDER%\php-cgi.exe'] | |
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /+[name='PHPviaFastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='%PHP_FOLDER%\php-cgi.exe',resourceType='Either'] | |
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='%PHP_FOLDER%\php-cgi.exe'].instanceMaxRequests:10000 | |
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /+[fullPath='%PHP_FOLDER%\php-cgi.exe'].environmentVariables.[name='PHP_FCGI_MAX_REQUESTS',value='10000'] | |
echo "<?php phpinfo(); ?>" > C:\inetpub\wwwroot\info.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment