我一直試圖在Tomcat上使用PHP(不要問爲什麼,我只需要),並且一直遵循Configure PHP with Tomcat以及針對PHP和PECL & Tomcat給出的幾個教程。在Tomcat上配置PHP給出了一個例外:UnsatisfiedLinkError
我所做的大部分由教程要求,如設置了所需要的所有環境變量的東西,但我仍然會碰到錯誤,如下面所示的一個,在啓動時:
javax.servlet.ServletException: Servlet.init() for servlet php threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Thread.java:619)
root cause
java.lang.UnsatisfiedLinkError: C:\WINDOWS\system32\php5servlet.dll: The specified procedure could not be found
java.lang.ClassLoader$NativeLibrary.load(Native Method)
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
java.lang.Runtime.loadLibrary0(Runtime.java:823)
java.lang.System.loadLibrary(System.java:1028)
net.php.reflect.loadLibrary(reflect.java:34)
net.php.reflect.<clinit>(reflect.java:29)
net.php.servlet.init(servlet.java:157)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Thread.java:619)
此外,每當我刷新頁面。它給出了這個例外:
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.UnsatisfiedLinkError:
net.php.servlet.send(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Z)V
net.php.servlet.send(Native Method)
net.php.servlet.service(servlet.java:190)
net.php.servlet.service(servlet.java:214)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
我一直在試圖解決這個,自從昨天失敗,失敗。誰能告訴我我在這裏做錯了什麼?或者解決方案可能是什麼?謝謝。