Tuesday, September 6, 2022
HomeOperating SystemFastCGI function have to be enabled with a view to register PHP

FastCGI function have to be enabled with a view to register PHP


When you have enabled CGI/FastCGI utilizing the Home windows Options Expertise, and even then, in case you discover no CGI icon in IIS Supervisor, this publish will allow you to repair the issue. You may also determine the problem once you verify with the PHP supervisor and see a message saying – FastCGI function have to be enabled with a view to register PHP.

Why can't I enable CGI/FastCGI in IIS under Windows 11/10

What’s CGI/FastCGI in IIS?

Net applied sciences like CGI (Widespread Gateway Interface) permit net servers (HTTP servers) to hook up with exterior functions like PHP. On account of CGI, net servers can generate and course of dynamic content material.

FastCGI feature must be enabled in order to register PHP

Why can’t I allow CGI/FastCGI in IIS underneath Home windows 11/10?

Observe these solutions to revive CGI/FastCGI in IIS underneath Home windows. These options are identified to work as recommended by discussion board customers.

  1. Run SFC & DISM, Then Reinstall
  2. Set up with PowerShell

You have to an admin consumer account to execute the recommended steps.

FastCGI function have to be enabled with a view to register PHP

1] Run SFC & DISM, Then Reinstall

One of many customers reported that working SFC and DISM instruments will help repair the issue. When you run these instruments, you will need to uninstall CGI and reinstall it. It can carry again the CGI and FastCGI Module within the IIS supervisor.

  • Open Command Immediate or Home windows terminal with admin permission
  • Sort the next instructions and execute them one after the other. Make sure you await them to finish earlier than working the opposite one.
sfc /scannow
DISM /On-line /Cleanup-Picture /RestoreHealth
  • Your PC might restart as soon as the instruments full the execution. If it doesn’t, we suggest that you simply manually restart the PC.
  • Subsequent, go to Home windows Options, uninstall the CGI module, and reinstall it.
  • Verify with the IIS supervisor in case you can see the module.

2] Set up with PowerShell

One other approach to resolve the problem is to put in CGI and FastCGI within the Clear Boot state. This state ensures any third get together apps that may very well be stalling the correct set up. Run the next script in an elevated PowerShell window.

$options = @(
"Net-WebServer",
"Net-Static-Content material",
"Net-Http-Errors",
"Net-Http-Redirect",
"Net-Stat-Compression",
"Net-Filtering",
"Net-Asp-Net45",
"Net-Web-Ext45",
"Net-ISAPI-Ext",
"Net-ISAPI-Filter",
"Net-Mgmt-Console",
"Net-Mgmt-Instruments",
"NET-Framework-45-ASPNET",
"Net-Mgmt-Service",
"Net-Home windows-Auth",
"Net-CGI",
"Net-Dyn-Compression",
"Net-Scripting-Instruments",
"Net-Dyn-Compression"
)

# Add Home windows Options 
add-WindowsFeature $options -Verbose

This script can be helpful if the set up fails and the DISM doesn’t assist.

Conclusion

It’s annoying once you allow a function, it’s proven as enabled, however it isn’t what you anticipated. It’s a kind of conditions. We hope the publish was simple to observe and also you had been in a position to resolve the issue the place you can not allow CGI/FastCGI in IIS underneath Home windows 11/10.

How do I do know if FastCGI is enabled?

You possibly can create a PHP file and execute the code <?php phpinfo(); ?>. When you entry the web page in your web site, verify the output of phpinfo and search for _SERVER[“REQUEST_URI”]. If this variable is lacking, then CGI is used; else, ISAPI or FastCGI is used. If the _SERVER[“REQUEST_URI”] is empty, then CGI or FastCGI shouldn’t be enabled.

What’s the distinction between CGI and FastCGI?

With FastCGI, exterior functions can interface with Net servers extra effectively than with the Widespread Gateway Interface (CGI), which IIS has supported since its inception. ISAPI extensions or CGI applications run PHP historically on IIS. A CGI program outputs dynamic info when a Net server launches it. Each CGI request is executed in a separate course of that begins originally and ends on the finish.

Cannot enable CGIFastCGI in IIS under Windows

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments