HTTP状态500 - PHP FastCGI实例失败

I've added JavaBridge to apache-tomcat/webapps/.
When I try to open JavaBridge in browser (localhost:8080/JavaBridge) I get

HTTP Status 500 - PHP FastCGI instance failed. 

And without it I presume c/p JavaBridge.jar, php-script.jar and php-servlet.jar, and creating a test.php is useless.
How do i fix this problem?

I'm using tomcat v7 on JasperReports Server 6.0.1

The rest of the error:

type Exception report

message PHP FastCGI instance failed.

description The server encountered an internal error that prevented it from fulfilling this request.

exception 

javax.servlet.ServletException: PHP FastCGI instance failed.
    php.java.servlet.fastcgi.FastCGIServlet.execute(FastCGIServlet.java:448)
    php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:481)
    php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:521)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    php.java.servlet.PhpCGIFilter.doFilter(PhpCGIFilter.java:126)


root cause 

php.java.bridge.http.FCGIConnectionException
    php.java.bridge.http.FCGIInputStream.read(FCGIInputStream.java:58)
    php.java.servlet.fastcgi.FastCGIServlet.parseBody(FastCGIServlet.java:362)
    php.java.servlet.fastcgi.FastCGIServlet.execute(FastCGIServlet.java:433)
    php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:481)
    php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:521)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    php.java.servlet.PhpCGIFilter.doFilter(PhpCGIFilter.java:126)


root cause 

java.io.IOException: Protocol error
    php.java.bridge.http.FCGIInputStream.doRead(FCGIInputStream.java:67)
    php.java.bridge.http.FCGIInputStream.read(FCGIInputStream.java:54)
    php.java.servlet.fastcgi.FastCGIServlet.parseBody(FastCGIServlet.java:362)
    php.java.servlet.fastcgi.FastCGIServlet.execute(FastCGIServlet.java:433)
    php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:481)
    php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:521)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    php.java.servlet.PhpCGIFilter.doFilter(PhpCGIFilter.java:126)


note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs.

Copy files from C:/PHP to C:/Program Files/PHP

JavaBridge.war has incorrect php-cgi binary, and uses php.ini from cgi directory. It must be installed in C:/Program Files/PHP (C:/PHP does not work, unless somehow init-parmas are changed in web.xml)

Check this 2 issues too.

1) Windows installation requires php.ini to be in C:\WINDOWS, unless you use the following registry key to put it somewhere else: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath.

2) Just for completeness, not a JavaBridge issue: Don't use PHP installer for Windows, doesn't provide everything. Instead get the binary distribution and unzip manually into C:/Program Files/PHP, add C:/Program Files/PHP into Windows Path, add PHPRC=C:/Program Files/PHP env var. Modify php.ini to change extensions_dir=C:/Program Files/PHP/ext