HTTP Error 502.2 - Bad Gateway

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "<b>Security Alert!</b> The PHP CGI cannot be accessed directly. <p>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.</p> <p>For more information as to <i>why</i> this behaviour exists, see the <a href="http://php.net/security.cgi-bin">manual page for CGI security</a>.</p> <p>For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit <a href="http://php.net/install.windows">the manual page</a>.</p> ".

Most likely causes:

  • The CGI process was shut down or terminated unexpectedly before it finished processing the request.
  • The CGI process has a flaw and does not return a complete set of HTTP headers.

Things you can try:

  • Check the event logs on the system to see whether the CGI process is shutting down unexpectedly.
  • Troubleshoot the CGI application to determine why it is not sending a complete set of HTTP headers.

Detailed Error Information:

Module   CgiModule
Notification   ExecuteRequestHandler
Handler   PHP-CGI
Error Code   0xffffffff
Requested URL   http://web2.mmhk.cz:80/zm/2018/39b/index.php
Physical Path   E:\weby\web2\zm\2018\39b\index.php
Logon Method   Anonymous
Logon User   Anonymous

More Information:

This error occurs when the CGI process handling the request exits before it finishes sending the response to IIS.

View more information »