I have this message when I trying to browse my web page:

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.

*I'm on windows 2003, IIS 6.0

Thank for you help!

Is there my php.ini:

; Directory in which the loadable extensions (modules) reside.
extension_dir = C:\Inetpub\PHP\extensions

; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
enable_dl = On

; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
; You CAN safely turn this off for IIS, in fact, you MUST.
cgi.force_redirect = 0

; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
; will look for to know it is OK to continue execution. Setting this variable MAY
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
;cgi.redirect_status_env = ;

    a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

    cgi.force_redirect is necessary to provide security running PHP as a CGI under most web servers. Left undefined, PHP turns this on by default. You can turn it off here AT YOUR OWN RISK

    i know it says you must turn it off for IIS, but if it has to be off, php will disable it.

    so i'd try setting cgi.force_redirect = 1 - what's the worst that could happen?

      I have try to set cgi.force_redirect = 1 but a receive the same error message....

        Write a Reply...