Era Host hosting
EraHost – Free Domain, Cheap Hosting!
Client Area
Support 24/7
Menu

Fixing "FastCgiModule is Not a Recognized Native Module" in IIS

2 min read
23.04.2025

Verify That FastCGI is Installed

  1. Press Win + R, type inetmgr, and press Enter.
  2. Click on "Server Manager" > "Manage" > "Add Roles and Features".
  3. Scroll to "Web Server (IIS)" and click "Role Services".
  4. Ensure "CGI" is checked under "Application Development".

If it is not installed, install it and restart IIS.

IIS FastCgiModule Not Recognized
IIS CGI feature missing — install via Server Manager or PowerShell.

For closely related PHP runtime / web server topics, see Fix "PHP Version Does Not Meet Bitrix Requirements" and Fixing ERR_INVALID_RESPONSE in PHP.

Windows VDS
Windows server for work, business and remote access
  • NVMe
  • DDR5
  • Fast
  • Reliable
Windows VDS

Install FastCGI via PowerShell (If Missing)

If FastCGI is not installed, add it via PowerShell:

Enable-WindowsOptionalFeature -Online -FeatureName IIS-CGI

Restart IIS

iisreset

Verify FastCGI is Enabled in IIS

  1. Open IIS Manager.
  2. Click "Handler Mappings" (at the server level).
  3. Ensure "FastCgiModule" is listed.
  4. If missing, click "Add Module Mapping" and configure:
    • Request Path: *.php
    • Module: FastCgiModule
    • Executable: C:\php\php-cgi.exe
    • Name: PHP via FastCGI
    • Click OK > Yes to confirm.

Restart IIS:

iisreset

Register FastCGI in IIS Manually

If FastCgiModule is still not recognized, manually add it in the IIS configuration.

Open Command Prompt (Admin)

Run:

cd %windir%\system32\inetsrv
appcmd add module /name:FastCgiModule /image:"C:\Windows\System32\inetsrv\iisfcgi.dll"

Restart IIS

iisreset

Summary of Fixes

Issue Fix
FastCGI not installed Install via Server Manager or PowerShell
FastCGI module missing in IIS Add manually in Handler Mappings
Module not registered Run appcmd add module
IIS not updated after changes Run iisreset

Now FastCgiModule should work in IIS!

Frequently asked questions
PowerShell is faster and scriptable: `Install-WindowsFeature -Name Web-CGI`. Server Manager UI requires clicking through Add Roles & Features wizard. PowerShell wins for repeatable deployments; UI for ad-hoc on a single server. Both require Administrator privileges.
Restart the IIS Admin Service: `iisreset` or in Services.msc restart "World Wide Web Publishing Service". Sometimes the module is installed but IIS process loaded before. Verify via Server Manager → Web Server (IIS) → CGI checkbox is now ticked. If not ticked after install, install didn't complete — re-run.
Install PHP separately (Microsoft Web Platform Installer used to make this one-click; modern: download PHP NTS zip from windows.php.net, extract to C:\php). In IIS Manager: Handler Mappings → Add Module Mapping → pointing `.php` requests at `C:\php\php-cgi.exe`. Verify with a phpinfo.php page; if it serves source instead of running, handler mapping didn't apply.
Rare. The Add Roles install registers FastCGI handler automatically. Manual `appcmd install module /name:FastCgiModule /image:%SystemRoot%\System32\inetsrv\iisfcgi.dll` is for when the auto-install left the binary on disk but didn't register. Typically after a failed Windows update or corrupted installation. Run from elevated cmd in `C:\Windows\System32\inetsrv\`.
Related articles
WordPress: Server Doesn't Have ImageMagick or GD Installed/Enabled
Zend Hosting: What It Is and How to Set It Up
Fixing depth_zero_self_signed_cert in cPanel with a Self-Signed Certificate