IIS and FastCGI/Registering interpreter
From Wikibooks, the open-content textbooks collection
This page is largely a wiki-mirror of the official Microsoft docs.[1]
Contents |
[edit] Registering Interpreter with FastCGI
To register an extension globally:
## php cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe" ## perl cscript fcgiconfig.js -add -section:"Perl" -extension:pl -path:"C:\strawberry\perl\bin\perl.exe"
To register a site-specific extension simply add the -site=<sitenum> flag. (No angle brackets)
cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe" –site:1
On success you should see:
Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. INI successfully written.
[edit] Confirming Success
Hesitant to agree upon a definition of success, with Microsoft? You can verify success by following these steps, Start → Administrative Tools → Internet Information Services (IIS) Manager → Right Mouse click on Web Sites folder Properties → Home Directory → Configuration → Select extension you installed → Edit → you should see C:\WINDOWS\system32\inetsrv\fcgiext.dll or the like in the executable field.
[edit] Troubleshooting
ScriptMap already exists
- Example:
C:\WINDOWS\system32\inetsrv\fcgiconfig.js(1223, 5) (null): ScriptMap already exi sts, path=IIS://localhost/W3SVC, scriptmap=.pl,C:\Perl\bin\perl.exe "%s" %s,5,GE T,HEAD,POST
- Cause: Often old Active State CGI garbage
- Solution: Start → Administrative Tools → Internet Information Services (IIS) Manager → Right Mouse click on Web Sites folder Properties → Home Directory → Configuration → Delete all conflicting extensions i.e. .pl, .plex, .plx, .php, .rb etc. → OK / Confirm
[edit] Footnotes
- ^ Information based on examples graciously provided by Microsoft: Using FastCGI to Host PHP Applications on IIS 6.0 and IIS 5.1. IIS And FastCG. Microsoft (2007-09-24). Retrieved on 2008-02-05.

