JavaBridge.war + tomcat + php-cgi + glibc_2.7缺少库问题

时间:2012-07-03 17:55:48

标签: java php tomcat

我已经在这里指定了一个带有JavaBridge的tomcat实例:

http://php-java-bridge.sourceforge.net/doc/tomcat6.php

我已经在我的webapps目录中添加了一个JavaBridge.war项目,因为我想运行嵌入式php-cgi。

我在catalina.sh中更新了java -D命令行选项:

-Dphp.java.bridge.php_exec = /path/to/webapps/JavaBridge/WEB-INF/cgi/i386-linux/php-cgi

(如此处所述:PHP/Java bridge problem

当我在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)

P.S。我不想安装php,更喜欢在JavaBridge.war中使用来自war的嵌入式。更新/lib/tls/libc.so.6不是一个选项。救命! :)

P.P.S。我发现这个问题的另一个地方就在这里:

http://sourceforge.net/mailarchive/forum.php?forum_name=php-java-bridge-users&max_rows=25&style=nested&viewmonth=201101

0 个答案:

没有答案