Közlemény

Collapse
No announcement yet.

PHP setup on IIS8

Collapse
X
 
  • Filter
  • Idő
  • Show
Clear All
new posts

  • PHP setup on IIS8

    Gyors leírás, hogy miként lehet kézzel beállítani a PHP-t a Win Server2012-n, illetve IIS 8.0-án.

    Miután kibontottad egy könyvtárba a kiválasztott PHP Non Thread Safe verziót
    (innen: http://windows.php.net/download/), az IIS Managerben beállítod a következőket:

    In the "Add Module Mapping" dialog enter the following:

    Request path: *.php
    Module: FastCgiModule
    Executable: C:\[Path to PHP installation]\php-cgi.exe
    Name: PHP_via_FastCGI
    ----------------------------

    Configure IIS FastCGI settings:

    Environment Variables:
    PHP_FCGI_MAX_REQUESTS, value='10000'
    PHPRC, value='C:\PHP\php.ini'

    instanceMaxRequests:10000
    activityTimeout:"90"
    requestTimeout:"90"
    ----------------------------
    Last edited by ikon; 2013-03-11, 20:22.

  • #2
    Itt egy script, amivel a fentieket pl. egy phpsetup.bat fájl pikk-pakk beállít:

    Kód:
    @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:\Program Files\PHP\v7.4"
    
    REM Clear current PHP handlers
    appcmd.exe clear config /section:system.webServer/fastCGI
    REM The following command will generate an error message if PHP is not installed. This can be ignored.
    appcmd.exe set config /section:system.webServer/handlers /-[name='PHP_via_FastCGI']
    
    REM Set up the PHP handler
    appcmd.exe set config /section:system.webServer/fastCGI /+[fullPath='%phppath%\php-cgi.exe']
    appcmd.exe set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modul es='FastCgiModule',scriptProcessor='%phppath%\php-cgi.exe',resourceType='Unspecified']
    appcmd.exe set config /section:system.webServer/handlers /accessPolicy:Read,Script
    
    REM Configure FastCGI Variables
    appcmd.exe set config -section:system.webServer/fastCgi /[fullPath='%phppath%\php-cgi.exe'].instanceMaxRequests:10000
    appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHP_FCGI_MAX_REQUESTS',value='10000']"
    appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHPRC',value='%phppath%\php.ini']"
    
    PAUSE

    Comment

    Working...
    X