我已经部署了一个带有 JavaBridge 的 tomcat 实例,如下所示:
http://php-java-bridge.sourceforge.net/doc/tomcat6.php
我已经在我的 webapps 目录中添加了一个 JavaBridge.war 项目,因为我想运行 php-cgi Embedded。
我在 catalina.sh 中更新了 java -D 命令行选项:
-Dphp.java.bridge.php_exec = /path/to/webapps/JavaBridge/WEB-INF/cgi/i386-linux/php-cgi
(如此处所述:PHP/Java 桥接问题)
aaand 当我在 catalina.out 中启动 tomcat 时,我得到了这个:
/path/to/webapps/JavaBridge/WEB-INF/cgi/i386-linux/php-cgi: /lib/tls/libc.so.6: version
`GLIBC_2.7' not found (required by /local/home/fxf-int/deploy/phptc/www/phptest/JavaBridge
/WEB-INF/cgi/i386-linux/php-cgi)
Fatal Error: Failed to start PHP [/path/to/webapps/JavaBridge/WEB-INF/cgi/i386-linux/php-cgi, -v], reason: java.io.IOException: php could not be run, returned error code: 1, result: 1
Could not start FCGI server: java.io.IOException: PHP not found. Please install php-cgi. PHP test command was: [.../JavaBridge/WEB-INF/cgi/i386-linux/php-cgi, -v]
Timeout waiting for PHP FastCGI daemon
php.java.bridge.http.FCGIConnectException: Could not connect to server
at php.java.bridge.http.SocketChannelFactory.test(SocketChannelFactory.java:58)
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:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.io.IOException: java.net.ConnectException: Connection refused
at php.java.bridge.http.FCGIConnectException.<init>(FCGIConnectException.java:37)
... 29 more
Caused by: java.io.IOException: PHP not found. Please install php-cgi. PHP test command was: [/path/to/JavaBridge/WEB-INF/cgi/i386-linux/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.SocketChannelFactory.doBind(SocketChannelFactory.java:125)
at php.java.bridge.http.FCGIConnectionFactory.runFcgi(FCGIConnectionFactory.java:88)
at php.java.bridge.http.FCGIConnectionFactory$1.run(FCGIConnectionFactory.java:109)
PS 我不想安装 php,宁愿使用 JavaBridge.war 中的嵌入式战争。更新 /lib/tls/libc.so.6 不是一种选择。帮助!:)
PPS 我发现讨论这个问题的唯一其他地方是: