2015-03-02 156 views
0

我已將JavaBridge添加到apache-tomcat/webapps /。
當我嘗試在瀏覽器(localhost:8080/JavaBridge)打開JavaBridge的我得到HTTP狀態500 - PHP FastCGI實例失敗

HTTP Status 500 - PHP FastCGI instance failed. 

,沒有它我推測C/P JavaBridge.jar,PHP-script.jar和php-的servlet.jar,並創建一個測試.php沒用。
我該如何解決這個問題?

我使用tomcat的V7JasperReports的服務器6.0.1

錯誤的其餘部分:

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. 

回答

0

複製文件從C:/PHPC:/Program Files/PHP

JavaBridge.war有不正確的php-cgi二進制文件,並使用來自 cgi目錄的php.ini。它必須安裝在C:/Program Files/PHP(C:/ PHP不起作用,除非莫名其妙的init-parmas在web.xml中改變)

入住過這2個問題。

1)Windows安裝需要的php.ini在C:\WINDOWS,除非你使用 以下注冊表項,以把它別的地方: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath

2)爲了完整起見,不是JavaBridge問題:不要在Windows上使用PHP安裝程序 ,不提供所有內容。取而代之的是獲取二進制 分發並手動解壓縮到C:/Program Files/PHP,將C:/Program Files/PHP添加到Windows路徑中,添加PHPRC=C:/Program Files/PHP env var。修改 php.ini改變extensions_dir=C:/Program Files/PHP/ext

+0

我試過了,它不起作用 – Kerempuhh 2015-03-02 10:58:43

+0

但是你的錯誤是指向這個問題。 – Lafontein 2015-03-02 11:01:03

+0

我添加了2個問題,請檢查它們可能會有所幫助。 – Lafontein 2015-03-02 11:05:33

相關問題