PHP- Java Configuration Using JavaBridge in Eclipse

1.Download php-java-bridge_6.2.1_documentation



2.Extract it
3.eclipse→ import → war → choose JavaBride.war




then Finish


3.It contains Lots of Unwanted data . for this Just Delete all unwanted Data Except CGI. Dont Touch that one!


4.For Doing this Easly get javaBride Template from

5.eclipse→ import → war → choose JavaBridgeTemplate.war


6.If u Run directly it will shows → Error Logs Like


php.java.bridge.http.FCGIConnectException: Could not connect to server
at php.java.bridge.http.NPChannelFactory.test(NPChannelFactory.java:64)
at php.java.bridge.http.FCGIConnectionPool.<init>(FCGIConnectionPool.java:175)
at php.java.bridge.http.FCGIConnectionPool.<init>(FCGIConnectionPool.java:189)
at php.java.servlet.ContextLoaderListener.createConnectionPool(ContextLoaderListener.java:541)
at php.java.servlet.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:185)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: File \\.\pipe\C:\Users\skaveti\AppData\Local\Temp\JavaBridge8042128076258839240.socket not writable
at php.java.bridge.http.FCGIConnectException.<init>(FCGIConnectException.java:37)
... 14 more
Caused by: java.io.IOException: PHP not found. Please install php-cgi. PHP test command was: [php-cgi, -v]
at php.java.bridge.Util$Process.start(Util.java:1145)
at php.java.servlet.fastcgi.FCGIProcess.start(FCGIProcess.java:68)
at php.java.bridge.http.NPChannelFactory.doBind(NPChannelFactory.java:94)
at php.java.bridge.http.FCGIConnectionFactory.runFcgi(FCGIConnectionFactory.java:88)
at php.java.bridge.http.FCGIConnectionFactory$1.run(FCGIConnectionFactory.java:109)
Jun 09, 2014 12:56:11 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /JavaBridgeTemplate621 threw load() exception
java.io.IOException: PHP not found. Please install php-cgi. PHP test command was: [php-cgi, -v]
at php.java.bridge.Util$Process.start(Util.java:1145)
at php.java.servlet.fastcgi.FCGIProcess.start(FCGIProcess.java:68)
at php.java.bridge.http.NPChannelFactory.doBind(NPChannelFactory.java:94)
at php.java.bridge.http.FCGIConnectionFactory.runFcgi(FCGIConnectionFactory.java:88)
at php.java.bridge.http.FCGIConnectionFactory$1.run(FCGIConnectionFactory.java:109)


6.And the webpage Like


This Means CGI Missed


7.So for that copy CGI in javaBridge to JavaTemplate


8.Clean and Restart the Server
9.Run test.php it will Work

Njoy….Next I will Show how to Integrate elfinder in our web app