Die folgenden Codebeispiele fügen eine FastCGI-Anwendung für PHP hinzu, setzen das Attribut instanceMaxRequests auf "10000" und die Umgebungsvariable PHP_FCGI_MAX_REQUESTS auf "10000". Jedes Beispiel fügt außerdem eine globale FastCGI-Handlerzuordnung für PHP-Dateien zu IIS hinzu und gibt den vollständigen Pfad zu einer ausführbaren FastCGI-Datei an.
appcmd.exe setze config -section: system.webServer / fastCgi /+"[fullPath='C:\PHP\php-cgi.exe',arguments='',, maxInstances='4',idleTimeout='300 ',activityTimeout = '30', requestTimeout = '90', instanceMaxRequests = '10000', protocol = 'NamedPipe', flushNamedPipe = 'False'] "/ commit: apphost
Vergessen Sie nicht, activityTimeout und den Pfad zu PHP in einem Beispiel oben zu ändern.
appcmd.exe setze config -section: system.webServer / fastCgi /+"[fullPath='C:\PHP\php-cgi.exe '--.Umweltvariablen.[name='PHP_FCGI_MAX_REQUESTS'value='10000'] "/ begehen: apphost
appcmd.exe setze config -section: system.webServer / handlers /+"[name='PHP-FastCGI',path='*.php',verb='GET,HEAD,POST ',modules='FastCgiModule' ,scriptProcessor = 'C: \ PHP \ php-cgi.exe', resourceType = 'Entweder', requiredAccess = 'Script'] "/ commit: apphost