IIS + PHP4 exception

Source: Internet
Author: User
The following error message is displayed on the IIS + PHP4 error page: & nbsp; SecurityAlert! ThePHPCGIcannotbeaccesseddirectly. & nbsp; ThisPHPCGIbinarywas IIS + PHP4 error
The prompt is as follows:



Security Alert! The php cgi cannot be accessed directly.

This php cgi binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.



For more information as to why this behaviour exists, see the manual page for CGI security.



For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.


------ Solution --------------------
IIS does not support CGI.
------ Solution --------------------
Ling
Php. ini
Fastcgi. impersonate = 1
------ Solution --------------------
Add force_redirect = 0 to php. ini.

------ Solution --------------------
Download a php for windows installation file. msi and install it directly. -- select fastCGI for iis. If your iis does not have its own fastCGI, you need to download a patch at the URL prompted by the php installation package and install php first.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.